From: <dai...@us...> - 2013-09-06 22:41:16
|
Revision: 6333 http://sourceforge.net/p/web-erp/reponame/6333 Author: daintree Date: 2013-09-06 22:41:12 +0000 (Fri, 06 Sep 2013) Log Message: ----------- patterns Modified Paths: -------------- trunk/CustomerBranches.php trunk/Customers.php trunk/StockStatus.php trunk/Stocks.php Modified: trunk/CustomerBranches.php =================================================================== --- trunk/CustomerBranches.php 2013-09-06 15:56:45 UTC (rev 6332) +++ trunk/CustomerBranches.php 2013-09-06 22:41:12 UTC (rev 6333) @@ -605,7 +605,7 @@ echo '<table class="selection"> <tr> <td>' . _('Branch Code'). ':</td> - <td><input ' .(in_array('BranchCode',$Errors) ? 'class="inputerror"' : '' ) . ' tabindex="1" type="text" name="BranchCode" required="required" pattern="[a-zA-Z0-9_]*" title="' . _('The branch code can be up to 10 alpha-numeric characters or underscores') . '" size="12" maxlength="10" value="' . $_POST['BranchCode'] . '" /></td> + <td><input ' .(in_array('BranchCode',$Errors) ? 'class="inputerror"' : '' ) . ' tabindex="1" type="text" name="BranchCode" required="required" pattern="[0-9a-zA-Z_]{1,10}" title="' . _('The branch code can be up to 10 alpha-numeric characters or underscores') . '" size="12" maxlength="10" value="' . $_POST['BranchCode'] . '" /></td> </tr>'; $_POST['DeliverBlind'] = $_SESSION['DefaultBlindPackNote']; } @@ -619,13 +619,14 @@ echo _('Branch Name').':</td>'; if (!isset($_POST['BrName'])) {$_POST['BrName']='';} echo '<td><input tabindex="2" type="text" autofocus="autofocus" required="required" name="BrName" title="' . _('The branch name should identify the particular delivery address of the customer and must be entered') . '" minlength="5" size="41" maxlength="40" value="'. $_POST['BrName'].'" /></td> - </tr>'; - echo '<tr> + </tr> + <tr> <td>' . _('Branch Contact').':</td>'; if (!isset($_POST['ContactName'])) {$_POST['ContactName']='';} echo '<td><input tabindex="3" type="text" name="ContactName" required="required" size="41" maxlength="40" value="'. $_POST['ContactName'].'" /></td> - </tr>'; - echo '<tr><td>' . _('Street Address 1 (Street)').':</td>'; + </tr> + <tr> + <td>' . _('Street Address 1 (Street)').':</td>'; if (!isset($_POST['BrAddress1'])) { $_POST['BrAddress1']=''; } @@ -792,11 +793,12 @@ </tr> <tr> <td>' . _('Phone Number').':</td>'; - if (!isset($_POST['PhoneNo'])) {$_POST['PhoneNo']='';} + if (!isset($_POST['PhoneNo'])) { + $_POST['PhoneNo']=''; + } echo '<td><input tabindex="16" type="tel" name="PhoneNo" pattern="[0-9+()\s]*" size="22" maxlength="20" value="'. $_POST['PhoneNo'].'" /></td> - </tr>'; - - echo '<tr> + </tr> + <tr> <td>' . _('Fax Number').':</td>'; if (!isset($_POST['FaxNo'])) { $_POST['FaxNo']=''; @@ -853,8 +855,6 @@ echo ' </select></td> </tr>'; - - $SQL = "SELECT shipper_id, shippername FROM shippers"; $ShipperResults = DB_query($SQL,$db); Modified: trunk/Customers.php =================================================================== --- trunk/Customers.php 2013-09-06 15:56:45 UTC (rev 6332) +++ trunk/Customers.php 2013-09-06 22:41:12 UTC (rev 6333) @@ -423,23 +423,24 @@ include('includes/footer.inc'); exit; } - echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '">'; - echo '<div>'; - echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; + echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '"> + <div> + <input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" /> + <input type="hidden" name="New" value="Yes" />'; - echo '<input type="hidden" name="New" value="Yes" />'; - $DataError =0; echo '<table class="selection" cellspacing="4"> - <tr><td valign="top"><table class="selection">'; + <tr> + <td valign="top"> + <table class="selection">'; /* if $AutoDebtorNo in config.php has not been set or if it has been set to a number less than one, then provide an input box for the DebtorNo to manually assigned */ if ($_SESSION['AutoDebtorNo']==0) { echo '<tr> <td>' . _('Customer Code') . ':</td> - <td><input tabindex="1" type="text" name="DebtorNo" required="required" autofocus="autofocus" pattern="[0-9a-zA-Z_]*" title="' . _('The customer code can be up to 10 alpha-numeric characters long or underscore') . '" size="11" maxlength="10" /></td></tr>'; + <td><input tabindex="1" type="text" name="DebtorNo" required="required" autofocus="autofocus" pattern="[0-9a-zA-Z_]{1,10}" title="' . _('The customer code can be up to 10 alpha-numeric characters long or underscore') . '" size="11" maxlength="10" /></td></tr>'; } echo '<tr> @@ -1183,4 +1184,4 @@ } // end of main ifs include('includes/footer.inc'); -?> \ No newline at end of file +?> Modified: trunk/StockStatus.php =================================================================== --- trunk/StockStatus.php 2013-09-06 15:56:45 UTC (rev 6332) +++ trunk/StockStatus.php 2013-09-06 22:41:12 UTC (rev 6333) @@ -59,7 +59,7 @@ echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '" method="post">'; echo '<div class="centre"><input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; -echo _('Stock Code') . ':<input type="text" pattern="(?!^[\s%]*$)[^+><]{1,20}" title ="'._('Input actual stock ID. Blank, percentage, plus, left and right angle bracket is not allowed').'" placeholder="'._('Blank, %, plus, left and right angle bracket is not allowed').'" required="required" name="StockID" size="21" value="' . $StockID . '" maxlength="20" />'; +echo _('Stock Code') . ':<input type="text" pattern="[0-9a-zA-Z_\-]{1,20}" title ="'._('Input the stock code to inquire upon. Only alpha-numeric characters are allowed in stock codes with no spaces punctuation or special characters. Underscore or dashes are allowed.').'" placeholder="'._('Alpha-numeric only').'" required="required" name="StockID" size="21" value="' . $StockID . '" maxlength="20" />'; echo ' <input type="submit" name="ShowStatus" value="' . _('Show Stock Status') . '" />'; Modified: trunk/Stocks.php =================================================================== --- trunk/Stocks.php 2013-09-06 15:56:45 UTC (rev 6332) +++ trunk/Stocks.php 2013-09-06 22:41:12 UTC (rev 6333) @@ -872,7 +872,7 @@ if ($New==1) { echo '<tr> <td>' . _('Item Code'). ':</td> - <td><input ' . (in_array('StockID',$Errors) ? 'class="inputerror"' : '' ) .' autofocus="autofocus" required="required" pattern="[0-9a-zA-Z_]*" type="text" value="'.$StockID.'" name="StockID" size="20" maxlength="20" /></td> + <td><input ' . (in_array('StockID',$Errors) ? 'class="inputerror"' : '' ) .' autofocus="autofocus" required="required" pattern="[0-9a-zA-Z_\-]{1,20}" type="text" value="'.$StockID.'" name="StockID" size="20" maxlength="20" title ="'._('Input the stock code, only alpha-numeric characters are allowed in stock codes with no spaces punctuation or special characters. Underscore and dashes are also allowed').'" placeholder="'._('alpha-numeric only').'" /></td> </tr>'; } else { echo '<tr> @@ -971,9 +971,9 @@ $_POST[$PostVariableName] =''; } echo '<tr> - <td>' . $LanguagesArray[$DescriptionLanguage]['LanguageName'] . ' ' . _('Description') . ':</td> - <td><input type="text" name="'. $PostVariableName . '" size="52" maxlength="50" value="' . $_POST[$PostVariableName] . '" /></td> - </tr>'; + <td>' . $LanguagesArray[$DescriptionLanguage]['LanguageName'] . ' ' . _('Description') . ':</td> + <td><input type="text" name="'. $PostVariableName . '" size="52" maxlength="50" value="' . $_POST[$PostVariableName] . '" title="' . _('This language translation of the item will be used in invoices and credits to customers who are defined to use this language. The language translations to maintain here can be configured in the system parameters page') . '" /></td> + </tr>'; } } |