From: <dai...@us...> - 2013-07-19 10:07:05
|
Revision: 6112 http://sourceforge.net/p/web-erp/reponame/6112 Author: daintree Date: 2013-07-19 10:07:00 +0000 (Fri, 19 Jul 2013) Log Message: ----------- HTML 5 work and start on table sorting Modified Paths: -------------- trunk/AccountGroups.php trunk/AccountSections.php trunk/AddCustomerContacts.php trunk/AgedDebtors.php trunk/AgedSuppliers.php trunk/Areas.php trunk/AuditTrail.php trunk/BOMExtendedQty.php trunk/BOMIndented.php trunk/BOMIndentedReverse.php trunk/BOMInquiry.php trunk/BOMListing.php trunk/BOMs.php trunk/BankAccounts.php trunk/BankMatching.php trunk/BankReconciliation.php trunk/CompanyPreferences.php trunk/ConfirmDispatch_Invoice.php trunk/ContractBOM.php trunk/ContractOtherReqts.php trunk/Contracts.php trunk/CopyBOM.php trunk/CounterReturns.php trunk/CounterSales.php trunk/CreditStatus.php trunk/Credit_Invoice.php trunk/Currencies.php trunk/CustEDISetup.php trunk/CustLoginSetup.php trunk/CustWhereAlloc.php trunk/CustomerAllocations.php trunk/CustomerBranches.php trunk/CustomerInquiry.php trunk/CustomerPurchases.php trunk/CustomerReceipt.php trunk/CustomerTransInquiry.php trunk/CustomerTypes.php trunk/Customers.php trunk/DailyBankTransactions.php trunk/DebtorsAtPeriodEnd.php trunk/DeliveryDetails.php trunk/Departments.php trunk/DiscountCategories.php trunk/DiscountMatrix.php trunk/EmailCustTrans.php trunk/Factors.php trunk/FixedAssetCategories.php trunk/FixedAssetDepreciation.php trunk/FixedAssetItems.php trunk/FixedAssetLocations.php trunk/FixedAssetRegister.php trunk/FixedAssetTransfer.php trunk/GLAccounts.php trunk/GLBalanceSheet.php trunk/GLBudgets.php trunk/GLCodesInquiry.php trunk/GLJournal.php trunk/GLTags.php trunk/GoodsReceived.php trunk/SelectOrderItems.php trunk/SelectProduct.php trunk/WorkOrderIssue.php trunk/css/aguapop/default.css trunk/css/default/default.css trunk/css/fluid/default.css trunk/css/fresh/default.css trunk/css/gel/default.css trunk/css/professional/default.css trunk/css/professional-rtl/default.css trunk/css/silverwolf/default.css trunk/css/wood/default.css trunk/includes/Login.php trunk/javascripts/MiscFunctions.js Added Paths: ----------- trunk/Logout.php Removed Paths: ------------- trunk/Logout.php Modified: trunk/AccountGroups.php =================================================================== --- trunk/AccountGroups.php 2013-07-19 09:30:09 UTC (rev 6111) +++ trunk/AccountGroups.php 2013-07-19 10:07:00 UTC (rev 6112) @@ -401,7 +401,7 @@ } echo '<tr> <td>' . _('Account Group Name') . ':' . '</td> - <td><input tabindex="1" autofocus required placeholder="' . _('Enter the account group name') . '" ' . (in_array('GroupName',$Errors) ? '"class=inputerror"' : '' ) . ' type="text" name="GroupName" size="30" maxlength="30" value="' . $_POST['GroupName'] . '" title="' . _('A unique name for the account group must be entered - at least 3 characters long and less than 30 characters long') . '" /></td> + <td><input tabindex="1" autofocus="autofocus" required="required" pattern="[a-zA-Z0-9_\-\ ]*" placeholder="' . _('Enter the account group name') . '" ' . (in_array('GroupName',$Errors) ? '"class=inputerror"' : '' ) . ' type="text" name="GroupName" size="30" minlength="3" maxlength="30" value="' . $_POST['GroupName'] . '" title="' . _('A unique name for the account group must be entered - at least 3 characters long and less than 30 characters long. Only alpha numeric characters can be used.') . '" /></td> </tr> <tr> <td>' . _('Parent Group') . ':' . '</td> @@ -459,18 +459,16 @@ </tr> <tr> <td>' . _('Sequence In TB') . ':' . '</td> - <td><input tabindex="5" type="number" min="0" maxlength="4" name="SequenceInTB" required class="number" value="' . $_POST['SequenceInTB'] . '" title="' . _('Enter the sequence number that this account group and its child general ledger accounts should display in the trial balance') . '" /></td> + <td><input tabindex="5" type="text" maxlength="4" name="SequenceInTB" required="required" class="number" value="' . $_POST['SequenceInTB'] . '" title="' . _('Enter the sequence number that this account group and its child general ledger accounts should display in the trial balance') . '" /></td> </tr> <tr> <td colspan="2"><div class="centre"><input tabindex="6" type="submit" name="submit" value="' . _('Enter Information') . '" /></div></td> </tr> </table> - <br />'; + <br /> + </div> + </form>'; - echo '<script type="text/javascript">defaultControl(document.forms[0].GroupName);</script>'; - echo '</div> - </form>'; - } //end if record deleted no point displaying form to add record include('includes/footer.inc'); ?> \ No newline at end of file Modified: trunk/AccountSections.php =================================================================== --- trunk/AccountSections.php 2013-07-19 09:30:09 UTC (rev 6111) +++ trunk/AccountSections.php 2013-07-19 10:07:00 UTC (rev 6112) @@ -251,11 +251,12 @@ echo '<table class="selection"> <tr> <td>' . _('Section Number') . ':' . '</td> - <td><input tabindex="1" ' . (in_array('SectionID',$Errors) ? 'class="inputerror"' : '' ) .' type="number" autofocus required min="0" name="SectionID" class="number" size="4" maxlength="4" value="' . $_POST['SectionID'] . '" /></td> + <td><input tabindex="1" ' . (in_array('SectionID',$Errors) ? 'class="inputerror"' : '' ) .' type="text" autofocus="autofocus" required="required" name="SectionID" class="number" size="4" maxlength="4" value="' . $_POST['SectionID'] . '" /></td> </tr>'; } - echo '<tr><td>' . _('Section Description') . ':' . '</td> - <td><input tabindex="2" ' . (in_array('SectionName',$Errors) ? 'class="inputerror"' : '' ) .' type="text" name="SectionName" required size="30" maxlength="30" value="' . $_POST['SectionName'] . '" /></td> + echo '<tr> + <td>' . _('Section Description') . ':' . '</td> + <td><input tabindex="2" ' . (in_array('SectionName',$Errors) ? 'class="inputerror"' : '' ) .' type="text" name="SectionName" required="required" size="30" maxlength="30" value="' . $_POST['SectionName'] . '" /></td> </tr>'; echo '<tr> Modified: trunk/AddCustomerContacts.php =================================================================== --- trunk/AddCustomerContacts.php 2013-07-19 09:30:09 UTC (rev 6111) +++ trunk/AddCustomerContacts.php 2013-07-19 10:07:00 UTC (rev 6112) @@ -213,10 +213,10 @@ echo '<tr> <td>'. _('Contact Name') . '</td>'; if (isset($_POST['ContactName'])) { - echo '<td><input type="text" autofocus required name="ContactName" value="' . $_POST['ContactName']. '" size="35" maxlength="40" /></td> + echo '<td><input type="text" autofocus="autofocus" required="required" name="ContactName" value="' . $_POST['ContactName']. '" size="35" maxlength="40" /></td> </tr>'; } else { - echo '<td><input type="text" required name="ContactName" size="35" maxlength="40" /></td> + echo '<td><input type="text" required="required" name="ContactName" size="35" maxlength="40" /></td> </tr>'; } echo '<tr> Modified: trunk/AgedDebtors.php =================================================================== --- trunk/AgedDebtors.php 2013-07-19 09:30:09 UTC (rev 6111) +++ trunk/AgedDebtors.php 2013-07-19 10:07:00 UTC (rev 6112) @@ -457,11 +457,11 @@ <table class="selection"> <tr> <td>' . _('From Customer Code') . ':' . '</td> - <td><input tabindex="1" autofocus required type="text" maxlength="6" size="7" name="FromCriteria" value="0" /></td> + <td><input tabindex="1" autofocus="autofocus" required="required" type="text" maxlength="6" size="7" name="FromCriteria" value="0" title="' . _('Enter the first customer code alphabetically to include in the report') . '" /></td> </tr> <tr> <td>' . _('To Customer Code') . ':' . '</td> - <td><input tabindex="2" type="text" required maxlength="6" size="7" name="ToCriteria" value="zzzzzz" /></td> + <td><input tabindex="2" type="text" required="required" maxlength="6" size="7" name="ToCriteria" value="zzzzzz" title="' . _('Enter the last customer code alphabetically to include in the report') . '" /></td> </tr> <tr> <td>' . _('All balances or overdues only') . ':' . '</td> Modified: trunk/AgedSuppliers.php =================================================================== --- trunk/AgedSuppliers.php 2013-07-19 09:30:09 UTC (rev 6111) +++ trunk/AgedSuppliers.php 2013-07-19 10:07:00 UTC (rev 6112) @@ -285,11 +285,11 @@ <table class="selection"> <tr> <td>' . _('From Supplier Code') . ':</td> - <td><input tabindex="1" type="text" maxlength="6" size="7" name="FromCriteria" value="1" /></td> + <td><input tabindex="1" type="text" required="required" autofocus="autofocus" maxlength="6" size="7" name="FromCriteria" value="1" title+"' . _('Enter the first supplier code alphabetially to include in the report') . '" /></td> </tr> <tr> <td>' . _('To Supplier Code') . ':</td> - <td><input tabindex="2" type="text" maxlength="6" size="7" name="ToCriteria" value="zzzzzz" /></td> + <td><input tabindex="2" type="text" maxlength="6" size="7" name="ToCriteria" required="required" value="zzzzzz" title="' . _('Enter the last supplier code alphabetically to include in the report') . '" /></td> </tr> <tr> <td>' . _('All balances or overdues only') . ':' . '</td> @@ -332,4 +332,4 @@ include('includes/footer.inc'); } /*end of else not PrintPDF */ -?> +?> \ No newline at end of file Modified: trunk/Areas.php =================================================================== --- trunk/Areas.php 2013-07-19 09:30:09 UTC (rev 6111) +++ trunk/Areas.php 2013-07-19 10:07:00 UTC (rev 6112) @@ -215,12 +215,12 @@ echo '<table class="selection"> <tr> <td>' . _('Area Code') . ':</td> - <td><input tabindex="1" ' . (in_array('AreaCode',$Errors) ? 'class="inputerror"' : '' ) .' type="text" name="AreaCode" required autofocus value="' . $_POST['AreaCode'] . '" size="3" maxlength="3" title="' . _('Enter the sales area code - up to 3 characters are allowed') . '" /></td> + <td><input tabindex="1" ' . (in_array('AreaCode',$Errors) ? 'class="inputerror"' : '' ) .' type="text" name="AreaCode" required="required" autofocus="autofocus" value="' . $_POST['AreaCode'] . '" size="3" maxlength="3" title="' . _('Enter the sales area code - up to 3 characters are allowed') . '" /></td> </tr>'; } echo '<tr><td>' . _('Area Name') . ':</td> - <td><input tabindex="2" ' . (in_array('AreaDescription',$Errors) ? 'class="inputerror"' : '' ) .' type="text" required name="AreaDescription" value="' . $_POST['AreaDescription'] .'" size="26" maxlength="25" title="' . _('Enter the description of the sales area') . '" /></td> + <td><input tabindex="2" ' . (in_array('AreaDescription',$Errors) ? 'class="inputerror"' : '' ) .' type="text" required="required" name="AreaDescription" value="' . $_POST['AreaDescription'] .'" size="26" maxlength="25" title="' . _('Enter the description of the sales area') . '" /></td> </tr>'; echo '<tr> Modified: trunk/AuditTrail.php =================================================================== --- trunk/AuditTrail.php 2013-07-19 09:30:09 UTC (rev 6111) +++ trunk/AuditTrail.php 2013-07-19 10:07:00 UTC (rev 6112) @@ -39,33 +39,39 @@ echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<table class="selection">'; -echo '<tr><td>'. _('From Date') . ' ' . $_SESSION['DefaultDateFormat'] .'</td> - <td><input tabindex="1" type="text" class="date" alt="'.$_SESSION['DefaultDateFormat'].'" name="FromDate" size="11" maxlength="10" value="' .$_POST['FromDate']. '" /></td></tr>'; -echo '<tr><td>'. _('To Date') . ' ' . $_SESSION['DefaultDateFormat'] .'</td> - <td><input tabindex="2" type="text" class="date" alt="'.$_SESSION['DefaultDateFormat'].'" name="ToDate" size="11" maxlength="10" value="' . $_POST['ToDate'] . '" /></td></tr>'; +echo '<tr> + <td>'. _('From Date') . ' ' . $_SESSION['DefaultDateFormat'] .'</td> + <td><input tabindex="1" type="text" class="date" alt="'.$_SESSION['DefaultDateFormat'].'" name="FromDate" size="11" maxlength="10" autofocus="autofocus" required="required" value="' .$_POST['FromDate']. '" onchange="isDate(this, this.value, '."'".$_SESSION['DefaultDateFormat']."'".')"/></td> + </tr> + <tr> + <td>'. _('To Date') . ' ' . $_SESSION['DefaultDateFormat'] .'</td> + <td><input tabindex="2" type="text" class="date" alt="'.$_SESSION['DefaultDateFormat'].'" name="ToDate" size="11" maxlength="10" required="required" value="' . $_POST['ToDate'] . '" onchange="isDate(this, this.value, '."'".$_SESSION['DefaultDateFormat']."'".')"/></td> + </tr>'; // Show user selections -echo '<tr><td>'. _('User ID'). '</td> - <td><select tabindex="3" name="SelectedUser">'; -echo '<option value="ALL">' . _('All') . '</option>'; -while ($users = DB_fetch_row($UserResult)) { +echo '<tr> + <td>'. _('User ID'). '</td> + <td><select tabindex="3" name="SelectedUser"> + <option value="ALL">' . _('All') . '</option>'; +while ($Users = DB_fetch_row($UserResult)) { if (isset($_POST['SelectedUser']) and $users[0]==$_POST['SelectedUser']) { - echo '<option selected="selected" value="' . $users[0] . '">' . $users[0] . '</option>'; + echo '<option selected="selected" value="' . $Users[0] . '">' . $Users[0] . '</option>'; } else { - echo '<option value="' . $users[0] . '">' . $users[0] . '</option>'; + echo '<option value="' . $Users[0] . '">' . $Users[0] . '</option>'; } } echo '</select></td></tr>'; // Show table selections -echo '<tr><td>'. _('Table '). '</td> - <td><select tabindex="4" name="SelectedTable">'; -echo '<option value="ALL">' . _('All') . '</option>'; -while ($tables = DB_fetch_row($TableResult)) { - if (isset($_POST['SelectedTable']) and $tables[0]==$_POST['SelectedTable']) { - echo '<option selected="selected" value="' . $tables[0] . '">' . $tables[0] . '</option>'; +echo '<tr> + <td>'. _('Table '). '</td> + <td><select tabindex="4" name="SelectedTable"> + <option value="ALL">' . _('All') . '</option>'; +while ($Tables = DB_fetch_row($TableResult)) { + if (isset($_POST['SelectedTable']) and $Tables[0]==$_POST['SelectedTable']) { + echo '<option selected="selected" value="' . $Tables[0] . '">' . $Tables[0] . '</option>'; } else { - echo '<option value="' . $tables[0] . '">' . $tables[0] . '</option>'; + echo '<option value="' . $Tables[0] . '">' . $Tables[0] . '</option>'; } } echo '</select></td></tr>'; @@ -74,15 +80,18 @@ $_POST['ContainingText']=''; } // Show the text -echo '<tr><td>' . _('Containing text') . ':</td>'; -echo '<td><input type="text" name="ContainingText" size="20" maxlength="20" value="'. $_POST['ContainingText'] . '" /></td></tr>'; +echo '<tr> + <td>' . _('Containing text') . ':</td> + <td><input type="text" name="ContainingText" size="20" maxlength="20" value="'. $_POST['ContainingText'] . '" /></td> + </tr> + </table> + <br /> + <div class="centre"> + <input tabindex="5" type="submit" name="View" value="' . _('View') . '" /> + </div> + </div> + </form>'; - -echo '</table><br />'; -echo '<div class="centre"><input tabindex="5" type="submit" name="View" value="' . _('View') . '" /></div>'; -echo '</div>'; -echo '</form>'; - // View the audit trail if (isset($_POST['View'])) { @@ -161,13 +170,14 @@ } $result = DB_query($sql,$db); - echo '<table border="0" width="98%" class="selection">'; - echo '<tr><th>' . _('Date/Time') . '</th> - <th>' . _('User') . '</th> - <th>' . _('Type') . '</th> - <th>' . _('Table') . '</th> - <th>' . _('Field Name') . '</th> - <th>' . _('Value') . '</th></tr>'; + echo '<table border="0" width="98%" class="selection"> + <tr> + <th>' . _('Date/Time') . '</th> + <th>' . _('User') . '</th> + <th>' . _('Type') . '</th> + <th>' . _('Table') . '</th> + <th>' . _('Field Name') . '</th> + <th>' . _('Value') . '</th></tr>'; while ($myrow = DB_fetch_row($result)) { if (Query_Type($myrow[2]) == "INSERT") { InsertQueryInfo(str_replace("INSERT INTO",'',$myrow[2])); Modified: trunk/BOMExtendedQty.php =================================================================== --- trunk/BOMExtendedQty.php 2013-07-19 09:30:09 UTC (rev 6111) +++ trunk/BOMExtendedQty.php 2013-07-19 10:07:00 UTC (rev 6112) @@ -257,11 +257,11 @@ <table class="selection"> <tr> <td>' . _('Part') . ':</td> - <td><input type ="text" name="Part" size="20" /></td> + <td><input type="text" autofocus="autofocus" required="required" name="Part" size="20" title="' . _('Enter the item code that you wish to display the extended bill of material for') . '" /></td> </tr> <tr> <td>' . _('Quantity') . ':</td> - <td><input type="text" class="number" name="Quantity" size="4" /></td> + <td><input type="text" class="number" required="required" name="Quantity" size="4" /></td> </tr> <tr> <td>' . _('Selection Option') . ':</td> Modified: trunk/BOMIndented.php =================================================================== --- trunk/BOMIndented.php 2013-07-19 09:30:09 UTC (rev 6111) +++ trunk/BOMIndented.php 2013-07-19 10:07:00 UTC (rev 6112) @@ -11,7 +11,7 @@ include('includes/PDFStarter.php'); $pdf->addInfo('Title',_('Indented BOM Listing')); $pdf->addInfo('Subject',_('Indented BOM Listing')); - $FontSize=9; + $FontSize=9;put $PageNumber=1; $line_height=12; @@ -251,7 +251,7 @@ <table class="selection">'; echo '<tr> <td>' . _('Part') . ':</td> - <td><input type ="text" name="Part" size="20" /></td> + <td><input type="text" name="Part" autofocus="autofocus" required="required" pattern="[0-9a-zA-Z\-_]*" title="' . _('Enter the item code of parent item to list the bill of material for') . '" size="20" /></td> </tr> <tr> <td>' . _('Levels') . ':</td> Modified: trunk/BOMIndentedReverse.php =================================================================== --- trunk/BOMIndentedReverse.php 2013-07-19 09:30:09 UTC (rev 6111) +++ trunk/BOMIndentedReverse.php 2013-07-19 10:07:00 UTC (rev 6112) @@ -239,7 +239,7 @@ <table class="selection"> <tr> <td>' . _('Part') . ':</td> - <td><input type ="text" name="Part" size="20" /></td> + <td><input type="text" autofocus-"autofocus" required="required" title="' ._('Enter the item code required to list the bill of material for') . '" name="Part" size="20" /></td> </tr> <tr> <td>' . _('Print Option') . ':</td> Modified: trunk/BOMInquiry.php =================================================================== --- trunk/BOMInquiry.php 2013-07-19 09:30:09 UTC (rev 6111) +++ trunk/BOMInquiry.php 2013-07-19 10:07:00 UTC (rev 6112) @@ -24,7 +24,7 @@ <table class="selection"> <tr> <td>' . _('Enter text extracts in the') . ' <b>' . _('description') . '</b>:</td> - <td><input tabindex="1" type="text" name="Keywords" size="20" maxlength="25" /></td> + <td><input tabindex="1" type="text" autofocus="autofocus" name="Keywords" size="20" maxlength="25" /></td> <td><b>' . _('OR') . '</b></td> <td>' . _('Enter extract of the') . ' <b>' . _('Stock Code') . '</b>:</td> <td><input tabindex="2" type="text" name="StockCode" size="15" maxlength="20" /></td> @@ -257,8 +257,5 @@ prnMsg(_('Enter a stock item code above') . ', ' . _('to view the costed bill of material for'),'info'); } -if (!isset($_POST['StockID']) or $_POST['StockID']=='') { - echo '<script type="text/javascript">defaultControl(document.forms[0].StockCode);</script>'; -} include('includes/footer.inc'); ?> \ No newline at end of file Modified: trunk/BOMListing.php =================================================================== --- trunk/BOMListing.php 2013-07-19 09:30:09 UTC (rev 6111) +++ trunk/BOMListing.php 2013-07-19 10:07:00 UTC (rev 6112) @@ -118,11 +118,11 @@ <table class="selection">'; echo '<tr><td>' . _('From Inventory Part Code') . ':' . '</td> - <td><input tabindex="1" type="text" name="FromCriteria" size="20" maxlength="20" value="1" /></td> + <td><input tabindex="1" type="text" autofocus="autofocus" required="required" pattern="[0-9a-zA-Z\-_]*" title="' . _('Enter the lowest alpha code of parent bom items to list the bill of material for') . '" name="FromCriteria" size="20" maxlength="20" value="1" /></td> </tr>'; echo '<tr><td>' . _('To Inventory Part Code') . ':' . '</td> - <td><input tabindex="2" type="text" name="ToCriteria" size="20" maxlength="20" value="zzzzzzz" /></td> + <td><input tabindex="2" type="text" required="required" pattern="[0-9a-zA-Z\-_]*" title="' . _('Enter the end alpha numeric code of any parent bom items to list the bill of material for') . '" name="ToCriteria" size="20" maxlength="20" value="zzzzzzz" /></td> </tr>'; @@ -130,7 +130,6 @@ <br /><div class="centre"><input tabindex="3" type="submit" name="PrintPDF" value="' . _('Print PDF') . '" /></div> </div> </form>'; - echo '<script type="text/javascript">defaultControl(document.forms[0].FromCriteria);</script>'; } include('includes/footer.inc'); Modified: trunk/BOMs.php =================================================================== --- trunk/BOMs.php 2013-07-19 09:30:09 UTC (rev 6111) +++ trunk/BOMs.php 2013-07-19 10:07:00 UTC (rev 6112) @@ -735,7 +735,7 @@ </tr> <tr> <td>' . _('Quantity') . ': </td> - <td><input ' . (in_array('Quantity',$Errors) ? 'class="inputerror"' : '' ) .' tabindex="4" type="text" class="number" name="Quantity" size="10" maxlength="8" value="'; + <td><input ' . (in_array('Quantity',$Errors) ? 'class="inputerror"' : '' ) .' tabindex="4" type="text" class="number" required="required" name="Quantity" size="10" maxlength="8" title="' . _('Enter the quantity of this item required for the parent item') . '" value="'; if (isset($_POST['Quantity'])){ echo $_POST['Quantity']; } else { @@ -754,7 +754,7 @@ echo '<tr> <td>' . _('Effective After') . ' (' . $_SESSION['DefaultDateFormat'] . '):</td> - <td><input ' . (in_array('EffectiveAfter',$Errors) ? 'class="inputerror"' : '' ) . ' tabindex="5" type="text" name="EffectiveAfter" class="date" alt="' .$_SESSION['DefaultDateFormat'] .'" size="11" maxlength="10" value="' . $_POST['EffectiveAfter'] .'" /></td> + <td><input ' . (in_array('EffectiveAfter',$Errors) ? 'class="inputerror"' : '' ) . ' tabindex="5" type="text" required="required" name="EffectiveAfter" class="date" alt="' .$_SESSION['DefaultDateFormat'] .'" size="11" maxlength="10" value="' . $_POST['EffectiveAfter'] .'" /></td> </tr> <tr> <td>' . _('Effective To') . ' (' . $_SESSION['DefaultDateFormat'] . '):</td> @@ -762,9 +762,10 @@ </tr>'; if ($ParentMBflag=='M' OR $ParentMBflag=='G'){ - echo '<tr><td>' . _('Auto Issue this Component to Work Orders') . ':</td> - <td> - <select tabindex="7" name="AutoIssue">'; + echo '<tr> + <td>' . _('Auto Issue this Component to Work Orders') . ':</td> + <td> + <select tabindex="7" name="AutoIssue">'; if (!isset($_POST['AutoIssue'])){ $_POST['AutoIssue'] = $_SESSION['AutoIssue']; @@ -778,13 +779,16 @@ } - echo '</select></td></tr>'; + echo '</select></td> + </tr>'; } else { echo '<input type="hidden" name="AutoIssue" value="0" />'; } echo '</table> - <br /><div class="centre"><input tabindex="8" type="submit" name="Submit" value="' . _('Enter Information') . '" /> + <br /> + <div class="centre"> + <input tabindex="8" type="submit" name="Submit" value="' . _('Enter Information') . '" /> </div> </div> </form>'; Modified: trunk/BankAccounts.php =================================================================== --- trunk/BankAccounts.php 2013-07-19 09:30:09 UTC (rev 6111) +++ trunk/BankAccounts.php 2013-07-19 10:07:00 UTC (rev 6112) @@ -288,7 +288,7 @@ echo '<table class="selection"> <tr> <td>' . _('Bank Account GL Code') . ':</td> - <td><select tabindex="1" ' . (in_array('AccountCode',$Errors) ? 'class="selecterror"' : '' ) .' name="AccountCode">'; + <td><select tabindex="1" ' . (in_array('AccountCode',$Errors) ? 'class="selecterror"' : '' ) .' name="AccountCode" autofocus="autofocus" >'; $sql = "SELECT accountcode, accountname @@ -326,7 +326,7 @@ echo '<tr> <td>' . _('Bank Account Name') . ': </td> - <td><input tabindex="2" ' . (in_array('AccountName',$Errors) ? 'class="inputerror"' : '' ) .' type="text" name="BankAccountName" value="' . $_POST['BankAccountName'] . '" size="40" maxlength="50" /></td> + <td><input tabindex="2" ' . (in_array('AccountName',$Errors) ? 'class="inputerror"' : '' ) .' type="text" required="required" name="BankAccountName" value="' . $_POST['BankAccountName'] . '" size="40" maxlength="50" /></td> </tr> <tr> <td>' . _('Bank Account Code') . ': </td> Modified: trunk/BankMatching.php =================================================================== --- trunk/BankMatching.php 2013-07-19 09:30:09 UTC (rev 6111) +++ trunk/BankMatching.php 2013-07-19 10:07:00 UTC (rev 6112) @@ -98,7 +98,7 @@ echo '<table class="selection"> <tr> <td align="left">' . _('Bank Account') . ':</td> - <td colspan="3"><select tabindex="1" name="BankAccount">'; + <td colspan="3"><select tabindex="1" autofocus="autofocus" name="BankAccount">'; $sql = "SELECT accountcode, bankaccountname FROM bankaccounts"; $resultBankActs = DB_query($sql,$db); @@ -125,12 +125,12 @@ // Change to allow input of FROM DATE and then TO DATE, instead of previous back-to-front method, add datepicker echo '<tr> <td>' . _('Show') . ' ' . $TypeName . ' ' . _('from') . ':</td> - <td><input tabindex="3" type="text" name="AfterDate" class="date" alt="'.$_SESSION['DefaultDateFormat'].'" size="12" maxlength="10" onchange="isDate(this, this.value, '."'".$_SESSION['DefaultDateFormat']."'".')" value="' . $_POST['AfterDate'] . '" /></td> + <td><input tabindex="3" type="text" name="AfterDate" class="date" alt="'.$_SESSION['DefaultDateFormat'].'" size="12" maxlength="10" required="required" onchange="isDate(this, this.value, '."'".$_SESSION['DefaultDateFormat']."'".')" value="' . $_POST['AfterDate'] . '" /></td> </tr>'; echo '<tr> <td>' . _('to') . ':</td> - <td><input tabindex="2" type="text" name="BeforeDate" class="date" alt="'.$_SESSION['DefaultDateFormat'].'" size="12" maxlength="10" onchange="isDate(this, this.value, '."'".$_SESSION['DefaultDateFormat']."'".')" value="' . $_POST['BeforeDate'] . '" /></td> + <td><input tabindex="2" type="text" name="BeforeDate" class="date" alt="'.$_SESSION['DefaultDateFormat'].'" size="12" maxlength="10" required="required" onchange="isDate(this, this.value, '."'".$_SESSION['DefaultDateFormat']."'".')" value="' . $_POST['BeforeDate'] . '" /></td> </tr>'; echo '<tr> <td colspan="3">' . _('Choose outstanding') . ' ' . $TypeName . ' ' . _('only or all') . ' ' . $TypeName . ' ' . _('in the date range') . ':</td> Modified: trunk/BankReconciliation.php =================================================================== --- trunk/BankReconciliation.php 2013-07-19 09:30:09 UTC (rev 6111) +++ trunk/BankReconciliation.php 2013-07-19 10:07:00 UTC (rev 6112) @@ -355,7 +355,7 @@ } echo '<tr> <td colspan="6">' . _('Enter the actual bank statement balance') . ' (' . $CurrencyRow['currcode'] . ')</b></td> - <td class="number"><input type="text" name="BankStatementBalance" maxlength="15" size="15" value="' . locale_number_format($_POST['BankStatementBalance'],$CurrencyRow['currdecimalplaces']) . '" /><td> + <td class="number"><input type="text" name="BankStatementBalance" class="number" autofocus="autofocus" required="required" maxlength="15" size="15" value="' . locale_number_format($_POST['BankStatementBalance'],$CurrencyRow['currdecimalplaces']) . '" /><td> </tr> <tr> <td colspan="7" align="center"><input type="submit" name="PostExchangeDifference" value="' . _('Calculate and Post Exchange Difference') . '" onclick="return confirm(\'' . _('This will create a general ledger journal to write off the exchange difference in the current balance of the account. It is important that the exchange rate above reflects the current value of the bank account currency') . ' - ' . _('Are You Sure?') . '\');" /></td> Modified: trunk/CompanyPreferences.php =================================================================== --- trunk/CompanyPreferences.php 2013-07-19 09:30:09 UTC (rev 6111) +++ trunk/CompanyPreferences.php 2013-07-19 10:07:00 UTC (rev 6112) @@ -6,8 +6,8 @@ $Title = _('Company Preferences'); /* webERP manual links before header.inc */ -$ViewTopic= "CreatingNewSystem"; -$BookMark = "CompanyParameters"; +$ViewTopic= 'CreatingNewSystem'; +$BookMark = 'CompanyParameters'; include('includes/header.inc'); if (isset($Errors)) { @@ -33,60 +33,7 @@ $Errors[$i] = 'CoyName'; $i++; } - if (mb_strlen($_POST['RegOffice1']) >40) { - $InputError = 1; - prnMsg(_('The Line 1 of the address must be forty characters or less long'),'error'); - $Errors[$i] = 'RegOffice1'; - $i++; - } - if (mb_strlen($_POST['RegOffice2']) >40) { - $InputError = 1; - prnMsg(_('The Line 2 of the address must be forty characters or less long'),'error'); - $Errors[$i] = 'RegOffice2'; - $i++; - } - if (mb_strlen($_POST['RegOffice3']) >40) { - $InputError = 1; - prnMsg(_('The Line 3 of the address must be forty characters or less long'),'error'); - $Errors[$i] = 'RegOffice3'; - $i++; - } - if (mb_strlen($_POST['RegOffice4']) >40) { - $InputError = 1; - prnMsg(_('The Line 4 of the address must be forty characters or less long'),'error'); - $Errors[$i] = 'RegOffice4'; - $i++; - } - if (mb_strlen($_POST['RegOffice5']) >20) { - $InputError = 1; - prnMsg(_('The Line 5 of the address must be twenty characters or less long'),'error'); - $Errors[$i] = 'RegOffice5'; - $i++; - } - if (mb_strlen($_POST['RegOffice6']) >15) { - $InputError = 1; - prnMsg(_('The Line 6 of the address must be fifteen characters or less long'),'error'); - $Errors[$i] = 'RegOffice6'; - $i++; - } - if (mb_strlen($_POST['Telephone']) >25) { - $InputError = 1; - prnMsg(_('The telephone number must be 25 characters or less long'),'error'); - $Errors[$i] = 'Telephone'; - $i++; - } - if (mb_strlen($_POST['Fax']) >25) { - $InputError = 1; - prnMsg(_('The fax number must be 25 characters or less long'),'error'); - $Errors[$i] = 'Fax'; - $i++; - } - if (mb_strlen($_POST['Email']) >55) { - $InputError = 1; - prnMsg(_('The email address must be 55 characters or less long'),'error'); - $Errors[$i] = 'Email'; - $i++; - } + if (mb_strlen($_POST['Email'])>0 and !IsEmailAddress($_POST['Email'])) { $InputError = 1; prnMsg(_('The email address is not correctly formed'),'error'); @@ -224,7 +171,7 @@ echo '<tr> <td>' . _('Name') . ' (' . _('to appear on reports') . '):</td> - <td><input '.(in_array('CoyName',$Errors) ? 'class="inputerror"' : '' ) .' tabindex="1" type="text" name="CoyName" value="' . stripslashes($_POST['CoyName']) . '" size="52" maxlength="50" /></td> + <td><input '.(in_array('CoyName',$Errors) ? 'class="inputerror"' : '' ) .' tabindex="1" type="text" autofocus="autofocus" required="required" name="CoyName" value="' . stripslashes($_POST['CoyName']) . '" minlength="5" pattern="[a-zA-Z0-9_\-\ ]*" title="' . _('Enter the name of the business, this will appear on all reports and at the top of each screen. Only alphanumeric characters space and dashes are allowed.') . '" size="52" maxlength="50" /></td> </tr>'; echo '<tr> @@ -239,22 +186,22 @@ echo '<tr> <td>' . _('Address Line 1') . ':</td> - <td><input '.(in_array('RegOffice1',$Errors) ? 'class="inputerror"' : '' ) .' tabindex="4" type="text" name="RegOffice1" size="42" maxlength="40" value="' . stripslashes($_POST['RegOffice1']) . '" /></td> + <td><input '.(in_array('RegOffice1',$Errors) ? 'class="inputerror"' : '' ) .' tabindex="4" type="text" name="RegOffice1" title="' . _('Enter the first line of the company registered office. This will appear on invoices and statements.') . '" required="required" size="42" maxlength="40" value="' . stripslashes($_POST['RegOffice1']) . '" /></td> </tr>'; echo '<tr> <td>' . _('Address Line 2') . ':</td> - <td><input '.(in_array('RegOffice2',$Errors) ? 'class="inputerror"' : '' ) .' tabindex="5" type="text" name="RegOffice2" size="42" maxlength="40" value="' . stripslashes($_POST['RegOffice2']) . '" /></td> + <td><input '.(in_array('RegOffice2',$Errors) ? 'class="inputerror"' : '' ) .' tabindex="5" type="text" name="RegOffice2" title="' . _('Enter the second line of the company registered office. This will appear on invoices and statements.') . '" size="42" maxlength="40" value="' . stripslashes($_POST['RegOffice2']) . '" /></td> </tr>'; echo '<tr> <td>' . _('Address Line 3') . ':</td> - <td><input '.(in_array('RegOffice3',$Errors) ? 'class="inputerror"' : '' ) .' tabindex="6" type="text" name="RegOffice3" size="42" maxlength="40" value="' . stripslashes($_POST['RegOffice3']) . '" /></td> + <td><input '.(in_array('RegOffice3',$Errors) ? 'class="inputerror"' : '' ) .' tabindex="6" type="text" name="RegOffice3" title="' . _('Enter the third line of the company registered office. This will appear on invoices and statements.') . '" size="42" maxlength="40" value="' . stripslashes($_POST['RegOffice3']) . '" /></td> </tr>'; echo '<tr> <td>' . _('Address Line 4') . ':</td> - <td><input '.(in_array('RegOffice4',$Errors) ? 'class="inputerror"' : '' ) .' tabindex="7" type="text" name="RegOffice4" size="42" maxlength="40" value="' . stripslashes($_POST['RegOffice4']) . '" /></td> + <td><input '.(in_array('RegOffice4',$Errors) ? 'class="inputerror"' : '' ) .' tabindex="7" type="text" name="RegOffice4" title="' . _('Enter the fourth line of the company registered office. This will appear on invoices and statements.') . '" size="42" maxlength="40" value="' . stripslashes($_POST['RegOffice4']) . '" /></td> </tr>'; echo '<tr> @@ -269,7 +216,7 @@ echo '<tr> <td>' . _('Telephone Number') . ':</td> - <td><input '.(in_array('Telephone',$Errors) ? 'class="inputerror"' : '' ) .' tabindex="10" type="text" name="Telephone" size="26" maxlength="25" value="' . $_POST['Telephone'] . '" /></td> + <td><input '.(in_array('Telephone',$Errors) ? 'class="inputerror"' : '' ) .' tabindex="10" type="tel" name="Telephone" required="required" title="' . _('Enter the main telephone number of the company registered office. This will appear on invoices and statements.') . '" size="26" maxlength="25" value="' . $_POST['Telephone'] . '" /></td> </tr>'; echo '<tr> @@ -279,7 +226,7 @@ echo '<tr> <td>' . _('Email Address') . ':</td> - <td><input '.(in_array('Email',$Errors) ? 'class="inputerror"' : '' ) .' tabindex="12" type="text" name="Email" size="50" maxlength="55" value="' . $_POST['Email'] . '" /></td> + <td><input '.(in_array('Email',$Errors) ? 'class="inputerror"' : '' ) .' tabindex="12" type="email" name="Email" title="' . _('Enter the main company email address. This will appear on invoices and statements.') . '" required="required" placeholder="acc...@ex..." size="50" maxlength="55" value="' . $_POST['Email'] . '" /></td> </tr>'; @@ -312,7 +259,7 @@ echo '<tr> <td>' . _('Debtors Control GL Account') . ':</td> - <td><select tabindex="14" name="DebtorsAct">'; + <td><select tabindex="14" title="' . _('Select the general ledger account to be used for posting the local currency value of all customer transactions to. This account will always represent the total amount owed by customers to the business. Only balance sheet accounts are available for this selection.') . '" name="DebtorsAct">'; while ($myrow = DB_fetch_row($result)) { if ($_POST['DebtorsAct']==$myrow[0]){ @@ -329,7 +276,7 @@ echo '<tr> <td>' . _('Creditors Control GL Account') . ':</td> - <td><select tabindex="15" name="CreditorsAct">'; + <td><select tabindex="15" title="' . _('Select the general ledger account to be used for posting the local currency value of all supplier transactions to. This account will always represent the total amount owed by the business to suppliers. Only balance sheet accounts are available for this selection.') . '" name="CreditorsAct">'; while ($myrow = DB_fetch_row($result)) { if ($_POST['CreditorsAct']==$myrow[0]){ @@ -363,7 +310,7 @@ echo '<tr> <td>' . _('Goods Received Clearing GL Account') . ':</td> - <td><select tabindex="17" name="GRNAct">'; + <td><select title="' . _('Select the general ledger account to be used for posting the cost of goods received pending the entry of supplier invoices for the goods. This account will represent the value of goods received yet to be invoiced by suppliers. Only balance sheet accounts are available for this selection.') . '" tabindex="17" name="GRNAct">'; while ($myrow = DB_fetch_row($result)) { if ($_POST['GRNAct']==$myrow[0]){ @@ -379,7 +326,7 @@ echo '<tr> <td>' . _('Retained Earning Clearing GL Account') . ':</td> - <td><select tabindex="18" name="RetainedEarnings">'; + <td><select title="' . _('Select the general ledger account to be used for clearing profit and loss accounts to that represents the accumulated retained profits of the business. Only balance sheet accounts are available for this selection.') . '" tabindex="18" name="RetainedEarnings">'; while ($myrow = DB_fetch_row($result)) { if ($_POST['RetainedEarnings']==$myrow[0]){ @@ -421,7 +368,7 @@ echo '<tr> <td>' . _('Sales Exchange Variances GL Account') . ':</td> - <td><select tabindex="20" name="ExchangeDiffAct">'; + <td><select title="' . _('Select the general ledger account to be used for posting accounts receivable exchange rate differences to - where the exchange rate on sales invocies is different to the exchange rate of currency receipts from customers, the exchange rate is calculated automatically and posted to this general ledger account. Only profit and loss general ledger accounts are available for this selection.') . '" tabindex="20" name="ExchangeDiffAct">'; while ($myrow = DB_fetch_row($result)) { if ($_POST['ExchangeDiffAct']==$myrow[0]){ @@ -438,7 +385,7 @@ echo '<tr> <td>' . _('Purchases Exchange Variances GL Account') . ':</td> - <td><select tabindex="21" name="PurchasesExchangeDiffAct">'; + <td><select tabindex="21" title="' . _('Select the general ledger account to be used for posting the exchange differences on the accounts payable transactions to. Supplier invoices entered at one currency and paid in the supplier currency at a different exchange rate have the differences calculated automatically and posted to this general ledger account. Only profit and loss general ledger accounts are available for this selection.') . '" name="PurchasesExchangeDiffAct">'; while ($myrow = DB_fetch_row($result)) { if ($_POST['PurchasesExchangeDiffAct']==$myrow[0]){ @@ -455,7 +402,7 @@ echo '<tr> <td>' . _('Payment Discount GL Account') . ':</td> - <td><select tabindex="22" name="PytDiscountAct">'; + <td><select title="' . _('Select the general ledger account to be used for posting the value of payment discounts given to customers at the time of entering a receipt. Only profit and loss general ledger accounts are available for this selection.') . '" tabindex="22" name="PytDiscountAct">'; while ($myrow = DB_fetch_row($result)) { if ($_POST['PytDiscountAct']==$myrow[0]){ @@ -472,7 +419,7 @@ echo '<tr> <td>' . _('Create GL entries for accounts receivable transactions') . ':</td> - <td><select tabindex="23" name="GLLink_Debtors">'; + <td><select title="' . _('Select yes to ensure that webERP creates general ledger journals for all accounts receivable transactions. webERP will maintain the debtors control account (selected above) to ensure it should always balance to the list of customer balances in local currency.') . '" tabindex="23" name="GLLink_Debtors">'; if ($_POST['GLLink_Debtors']==0){ echo '<option selected="selected" value="0">' . _('No') . '</option>'; @@ -487,7 +434,7 @@ echo '<tr> <td>' . _('Create GL entries for accounts payable transactions') . ':</td> - <td><select tabindex="24" name="GLLink_Creditors">'; + <td><select title="' . _('Select yes to ensure that webERP creates general ledger journals for all accounts payable transactions. webERP will maintain the creditors control account (selected above) to ensure it should always balance to the list of supplier balances in local currency.') . '" tabindex="24" name="GLLink_Creditors">'; if ($_POST['GLLink_Creditors']==0){ echo '<option selected="selected" value="0">' . _('No') . '</option>'; @@ -502,7 +449,7 @@ echo '<tr> <td>' . _('Create GL entries for stock transactions') . ':</td> - <td><select tabindex="25" name="GLLink_Stock">'; + <td><select title="' . _('Select yes to ensure that webERP creates general ledger journals for all inventory transactions. webERP will maintain the stock control accounts (selected under the inventory categories set up) to ensure they balance. Only balance sheet general ledger accounts can be selected.') . '" tabindex="25" name="GLLink_Stock">'; if ($_POST['GLLink_Stock']=='0'){ echo '<option selected="selected" value="0">' . _('No') . '</option>'; Modified: trunk/ConfirmDispatch_Invoice.php =================================================================== --- trunk/ConfirmDispatch_Invoice.php 2013-07-19 09:30:09 UTC (rev 6111) +++ trunk/ConfirmDispatch_Invoice.php 2013-07-19 10:07:00 UTC (rev 6112) @@ -343,7 +343,7 @@ if (isset($_POST['ProcessInvoice'])) { echo '<td class="number">' . locale_number_format($LnItm->QtyDispatched,$LnItm->DecimalPlaces) . '</td>'; } else { - echo '<td class="number"><input tabindex="'.$j.'" type="text" class="number" name="' . $LnItm->LineNumber . '_QtyDispatched" maxlength="12" size="12" value="' . locale_number_format($LnItm->QtyDispatched,$LnItm->DecimalPlaces) . '" /></td>'; + echo '<td class="number"><input tabindex="'.$j.'" type="text" ' . ($j==1 ? 'autofocus="autofocus" ':'') . ' class="number" required="required" title="' . _('Enter the quantity to charge the customer for, that has been dispatched') . '" name="' . $LnItm->LineNumber . '_QtyDispatched" maxlength="12" size="12" value="' . locale_number_format($LnItm->QtyDispatched,$LnItm->DecimalPlaces) . '" /></td>'; } } $DisplayDiscountPercent = locale_number_format($LnItm->DiscountPercent*100,2) . '%'; @@ -380,7 +380,7 @@ if (isset($_POST['ProcessInvoice'])) { echo $Tax->TaxRate*100; } else { - echo '<input type="text" class="number" name="' . $LnItm->LineNumber . $Tax->TaxCalculationOrder . '_TaxRate" maxlength="4" size="4" value="' . $Tax->TaxRate*100 . '" />'; + echo '<input type="text" class="number" required="required" title="' . _('Enter the tax rate applicable as a number') . '" name="' . $LnItm->LineNumber . $Tax->TaxCalculationOrder . '_TaxRate" maxlength="4" size="4" value="' . $Tax->TaxRate*100 . '" />'; } $i++; if ($Tax->TaxOnTax ==1){ @@ -490,7 +490,7 @@ OR $_POST['ChargeFreightCost']==0)) { echo '<td colspan="2" class="number">'. _('Charge Freight Cost inc Tax').'</td> - <td><input tabindex="'.$j.'" type="text" class="number" size="10" maxlength="12" name="ChargeFreightCost" value="0" /></td>'; + <td><input tabindex="'.$j.'" type="text" required="required" class="number" size="10" maxlength="12" name="ChargeFreightCost" value="0" /></td>'; $_SESSION['Items'.$identifier]->FreightCost=0; } else { echo '<td colspan="2" class="number">'. _('Charge Freight Cost inc Tax').'</td>'; @@ -1656,17 +1656,17 @@ echo '<table class="selection"> <tr> <td>' ._('Date On Invoice'). ':</td> - <td><input tabindex="'.$j.'" type="text" maxlength="10" size="15" name="DispatchDate" value="'.$DefaultDispatchDate.'" id="datepicker" alt="'.$_SESSION['DefaultDateFormat'].'" class="date" /></td> + <td><input tabindex="'.$j.'" type="text" maxlength="10" size="15" required="required" name="DispatchDate" value="' . $DefaultDispatchDate . '" id="datepicker" alt="' . $_SESSION['DefaultDateFormat'] . '" class="date" /></td> </tr>'; $j++; echo '<tr> <td>' . _('Consignment Note Ref'). ':</td> - <td><input tabindex="'.$j.'" type="text" maxlength="15" size="15" name="Consignment" value="' . $_POST['Consignment'] . '" /></td> + <td><input tabindex="'.$j.'" type="text" pattern="[a-zA-Z0-9_\-\ ]*" title="' . _('Enter the consignment note reference to enable tracking of the delivery in the event of customer proof of delivery issues') . '" maxlength="15" size="15" name="Consignment" value="' . $_POST['Consignment'] . '" /></td> </tr>'; $j++; echo '<tr> <td>' . _('No Of Packages in Delivery'). ':</td> - <td><input tabindex="'.$j.'" type="text" maxlength="6" size="6" class="number" name="Packages" value="' . $_POST['Packages'] . '" /></td> + <td><input tabindex="'.$j.'" type="number" maxlength="6" size="6" class="integer" name="Packages" value="' . $_POST['Packages'] . '" /></td> </tr>'; $j++; Modified: trunk/ContractBOM.php =================================================================== --- trunk/ContractBOM.php 2013-07-19 09:30:09 UTC (rev 6111) +++ trunk/ContractBOM.php 2013-07-19 10:07:00 UTC (rev 6112) @@ -265,11 +265,11 @@ echo '<td>' . $ContractComponent->StockID . '</td> <td>' . $ContractComponent->ItemDescription . '</td> - <td><input type="text" class="number" name="Qty' . $ContractComponent->ComponentID . '" size="11" value="' . locale_number_format($ContractComponent->Quantity,$ContractComponent->DecimalPlaces) . '" /></td> + <td><input type="text" class="number" required="required" title="' . _('Enter the quantity of this component required to complete the contract') . '" name="Qty' . $ContractComponent->ComponentID . '" size="11" value="' . locale_number_format($ContractComponent->Quantity,$ContractComponent->DecimalPlaces) . '" /></td> <td>' . $ContractComponent->UOM . '</td> <td class="number">' . locale_number_format($ContractComponent->ItemCost,$_SESSION['CompanyRecord']['decimalplaces']) . '</td> <td class="number">' . $DisplayLineTotal . '</td> - <td><a href="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?identifier='.$identifier. '&Delete=' . $ContractComponent->ComponentID . '" onclick="return confirm(\'' . _('Are you sure you wish to delete this item from the contract BOM?') . '\');">' . _('Delete') . '</a></td></tr>'; + <td><a href="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?identifier='.$identifier. '&Delete=' . $ContractComponent->ComponentID . '" onclick="return MakeConfirm(\'' . _('Are you sure you wish to delete this item from the contract BOM?') . ',' . _('Confirm Deletion') . '\');">' . _('Delete') . '</a></td></tr>'; $TotalCost += $LineTotal; } @@ -300,7 +300,8 @@ '</p>'; echo '<table class="selection"> <tr></tr> - <tr><td><select name="StockCat">'; + <tr> + <td><select name="StockCat">'; echo '<option selected="selected" value="All">' . _('All').'</option>'; while ($myrow1 = DB_fetch_array($result1)) { @@ -324,12 +325,12 @@ echo '</select></td> <td>' . _('Enter text extracts in the description') . ':</td> - <td><input type="text" name="Keywords" size="20" maxlength="25" value="' . $_POST['Keywords'] . '" /></td> + <td><input type="text" autofocus="autofocus" title="' . _('Enter any text that should appear in the item description as the basis of your search') . '" name="Keywords" size="20" maxlength="25" value="' . $_POST['Keywords'] . '" /></td> </tr> <tr> <td></td> <td><b>' . _('OR') . ' </b>' . _('Enter extract of the Stock Code') . ':</td> - <td><input type="text" name="StockCode" size="15" maxlength="18" value="' . $_POST['StockCode'] . '" /></td> + <td><input type="text" title="' . _('Enter any part of an item code to seach for all matching items containing that text in the code') . '" name="StockCode" size="15" maxlength="18" value="' . $_POST['StockCode'] . '" /></td> </tr> <tr> <td></td> @@ -375,12 +376,12 @@ $ImageSource = '<i>'._('No Image').'</i>'; } - echo '<td>'.$myrow['stockid'].'</td> - <td>'.$myrow['description'].'</td> - <td>'.$myrow['units'] . '</td> - <td>'.$ImageSource.'</td> - <td><input class="number" type="text" size="6" value="0" name="Qty'.$i.'" /> - <input type="hidden" name="StockID'.$i.'" value="' . $myrow['stockid'] . '" /> + echo '<td>' . $myrow['stockid'] . '</td> + <td>' . $myrow['description'] . '</td> + <td>' . $myrow['units'] . '</td> + <td>' . $ImageSource . '</td> + <td><input class="number" type="text" title="' . _('Enter the quantity required of this item to complete the contract') . '" required="required" size="6" value="0" name="Qty'.$i.'" /> + <input type="hidden" name="StockID' . $i . '" value="' . $myrow['stockid'] . '" /> </td> </tr>'; $i++; Modified: trunk/ContractOtherReqts.php =================================================================== --- trunk/ContractOtherReqts.php 2013-07-19 09:30:09 UTC (rev 6111) +++ trunk/ContractOtherReqts.php 2013-07-19 10:07:00 UTC (rev 6112) @@ -117,9 +117,9 @@ $k=1; } - echo '<td><textarea name="Requirement' . $ContractReqtID . '" cols="30" rows="3">' . $ContractComponent->Requirement . '</textarea></td> - <td><input type="text" class="number" name="Qty' . $ContractReqtID . '" size="11" value="' . locale_number_format($ContractComponent->Quantity,'Variable') . '" /></td> - <td><input type="text" class="number" name="CostPerUnit' . $ContractReqtID . '" size="11" value="' . locale_number_format($ContractComponent->CostPerUnit,$_SESSION['CompanyRecord']['decimalplaces']) . '" /></td> + echo '<td><textarea name="Requirement' . $ContractReqtID . '" cols="30" rows="3" required="required" title="' . _('Enter a description of this requirement for the contract') . '" >' . $ContractComponent->Requirement . '</textarea></td> + <td><input type="text" class="number" required="required" title="' . _('Enter the quantity of this requirement for the contract') . '" name="Qty' . $ContractReqtID . '" size="11" value="' . locale_number_format($ContractComponent->Quantity,'Variable') . '" /></td> + <td><input type="text" class="number" name="CostPerUnit' . $ContractReqtID . '" size="11" required="required" value="' . locale_number_format($ContractComponent->CostPerUnit,$_SESSION['CompanyRecord']['decimalplaces']) . '" /></td> <td class="number">' . $DisplayLineTotal . '</td> <td><a href="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?identifier='.$identifier. '&Delete=' . $ContractReqtID . '" onclick="return confirm(\'' . _('Are you sure you wish to delete this contract requirement?') . '\');">' . _('Delete') . '</a></td> </tr>'; @@ -153,15 +153,15 @@ </tr> <tr> <td>' . _('Requirement Description') . '</td> - <td><textarea name="RequirementDescription" cols="30" rows="3">' . $_POST['RequirementDescription'] . '</textarea></td> + <td><textarea name="RequirementDescription" cols="30" rows="3" minlength="5" title="' . _('Enter a description of this requirement for the contract') . '" >' . $_POST['RequirementDescription'] . '</textarea></td> </tr> <tr> <td>' . _('Quantity Required') . ':</td> - <td><input type="text" class="number" name="Quantity" size="10" maxlength="10" value="' . $_POST['Quantity'] . '" /></td> + <td><input type="text" class="number" name="Quantity" required="required" title="' . _('Enter the quantity of this requirement for the contract') . '" size="10" maxlength="10" value="' . $_POST['Quantity'] . '" /></td> </tr> <tr> <td>' . _('Cost Per Unit') . ':</td> - <td><input type="text" class="number" name="CostPerUnit" size="10" maxlength="10" value="' . $_POST['CostPerUnit'] . '" /></td> + <td><input type="text" class="number" name="CostPerUnit" size="10" required="required" title="' . _('Enter the cost per unit of this requirement') . '" maxlength="10" value="' . $_POST['CostPerUnit'] . '" /></td> </tr> </table> Modified: trunk/Contracts.php =================================================================== --- trunk/Contracts.php 2013-07-19 09:30:09 UTC (rev 6111) +++ trunk/Contracts.php 2013-07-19 10:07:00 UTC (rev 6112) @@ -84,8 +84,8 @@ /*User hit the button to enter line items - then meta refresh to Contract_Items.php*/ $InputError = false; - if(mb_strlen($_SESSION['Contract'.$identifier]->ContractRef)<2){ - prnMsg(_('The contract reference must be entered (and be longer than 2 characters) before the requirements of the contract can be setup'),'warn'); + if(mb_strlen($_SESSION['Contract'.$identifier]->ContractRef)<5){ + prnMsg(_('The contract reference must be entered (and be longer than 5 characters) before the requirements of the contract can be setup'),'warn'); $InputError = true; } @@ -755,17 +755,20 @@ echo '<table cellpadding="3" class="selection"> <tr> <td><h5>' . _('Part of the Customer Branch Name') . ':</h5></td> - <td><input tabindex="1" type="text" name="CustKeywords" size="20" maxlength="25" /></td> + <td><input tabindex="1" type="text" name="CustKeywords" autofocus="autofocus" size="20" maxlength="25" /></td> <td><h2><b>' . _('OR') . '</b></h2></td> <td><h5>' . _('Part of the Customer Branch Code'). ':</h5></td> - <td><input tabindex="2" type="text" name="CustCode" size="15" maxlength="18" /></td> + <td><input tabindex="2" type="text" name="CustCode" pattern="[a-zA-Z0-9_\-]*" title="' . _('Enter an extract of the customer code to search for. Customer codes can only contain alpha-numeric characters, underscore or hyphens') . '" size="15" maxlength="18" /></td> <td><h2><b>' . _('OR') . '</b></h2></td> <td><h5>' . _('Part of the Branch Phone Number') . ':</h5></td> - <td><input tabindex="3" type="text" name="CustPhone" size="15" maxlength="18" /></td> + <td><input tabindex="3" type="tel" name="CustPhone" size="15" maxlength="18" /></td> </tr> </table> - <br /><div class="centre"><input tabindex="4" type="submit" name="SearchCustomers" value="' . _('Search Now') . '" /> - <input tabindex="5" type="submit" name="reset" value="' . _('Reset') .'" /></div>'; + <br /> + <div class="centre"> + <input tabindex="4" type="submit" name="SearchCustomers" value="' . _('Search Now') . '" /> + <input tabindex="5" type="submit" name="reset" value="' . _('Reset') .'" /> + </div>'; if (isset($result_CustSelect)) { @@ -838,13 +841,14 @@ <td>'; if ($_SESSION['Contract'.$identifier]->Status==0) { /*Then the contract has not become an order yet and we can allow changes to the ContractRef */ - echo '<input type="text" name="ContractRef" size="21" maxlength="20" value="' . $_SESSION['Contract'.$identifier]->ContractRef . '" />'; + echo '<input type="text" name="ContractRef" autofocus="autofocus" required="required" size="21" title="' . _('Enter the contract reference. This reference will be used as the item code so no more than 20 alpha-numeric characters or underscore') . '" pattern="[a-zA-Z0-9_]*" maxlength="20" value="' . $_SESSION['Contract'.$identifier]->ContractRef . '" />'; } else { /*Just show the contract Ref - dont allow modification */ - echo '<input type="hidden" name="ContractRef" value="' . $_SESSION['Contract'.$identifier]->ContractRef . '" />' . $_SESSION['Contract'.$identifier]->ContractRef; + echo '<input type="hidden" name="ContractRef" title="' . _('Enter the contract reference. This reference will be used as the item code so no more than 20 alpha-numeric characters or underscore') . '" pattern="[a-zA-Z0-9_]*" value="' . $_SESSION['Contract'.$identifier]->ContractRef . '" />' . $_SESSION['Contract'.$identifier]->ContractRef; } - echo '</td></tr>'; - echo '<tr> + echo '</td> + </tr> + <tr> <td>' . _('Category') . ':</td> <td><select name="CategoryID" >'; @@ -907,7 +911,7 @@ </tr> <tr> <td>' . _('Contract Description') . ':</td> - <td><textarea name="ContractDescription" style="width:100%" rows="5" cols="40">' . $_SESSION['Contract'.$identifier]->ContractDescription . '</textarea></td> + <td><textarea name="ContractDescription" style="width:100%" required="required" title="' . _('A description of the contract is required') . '" minlength="5" rows="5" cols="40">' . $_SESSION['Contract'.$identifier]->ContractDescription . '</textarea></td> </tr><tr> <td>'. _('Drawing File') . ' .jpg' . ' ' . _('format only') .':</td> <td><input type="file" id="Drawing" name="Drawing" /></td> @@ -919,25 +923,25 @@ echo '<tr> <td>' . _('Required Date') . ':</td> - <td><input type="text" class="date" alt="' .$_SESSION['DefaultDateFormat'] . '" name="RequiredDate" size="11" value="' . $_SESSION['Contract'.$identifier]->RequiredDate . '" /></td> + <td><input type="text" required="required" class="date" alt="' .$_SESSION['DefaultDateFormat'] . '" name="RequiredDate" size="11" value="' . $_SESSION['Contract'.$identifier]->RequiredDate . '" /></td> </tr>'; echo '<tr> <td>' . _('Customer Reference') . ':</td> - <td><input type="text" name="CustomerRef" size="21" maxlength="20" value="' . $_SESSION['Contract'.$identifier]->CustomerRef . '" /></td> + <td><input type="text" name="CustomerRef" required="required" title="' . _('Enter the reference that the customer uses for this contract') . '" size="21" maxlength="20" value="' . $_SESSION['Contract'.$identifier]->CustomerRef . '" /></td> </tr>'; if (!isset($_SESSION['Contract'.$identifier]->Margin)){ $_SESSION['Contract'.$identifier]->Margin =50; } echo '<tr> <td>' . _('Gross Profit') . ' %:</td> - <td><input class="number" type="text" name="Margin" size="6" maxlength="6" value="' . locale_number_format($_SESSION['Contract'.$identifier]->Margin, 2) . '" /></td> + <td><input class="number" type="text" name="Margin" required="required" size="6" maxlength="6" value="' . locale_number_format($_SESSION['Contract'.$identifier]->Margin, 2) . '" /></td> </tr>'; if ($_SESSION['CompanyRecord']['currencydefault'] != $_SESSION['Contract'.$identifier]->CurrCode){ echo '<tr> <td>' . $_SESSION['Contract'.$identifier]->CurrCode . ' ' . _('Exchange Rate') . ':</td> - <td><input class="number" type="text" name="ExRate" size="10" maxlength="10" value="' . locale_number_format($_SESSION['Contract'.$identifier]->ExRate,'Variable') . '" /></td> + <td><input class="number" type="text" name="ExRate" required="required" title="' . _('The exchange rate between the customer\'s currency and the functional currency of the business must be entered') . '" size="10" maxlength="10" value="' . locale_number_format($_SESSION['Contract'.$identifier]->ExRate,'Variable') . '" /></td> </tr>'; } else { echo '<input type="hidden" name="ExRate" value="' . locale_number_format($_SESSION['Contract'.$identifier]->ExRate,'Variable') . '" />'; Modified: trunk/CopyBOM.php =================================================================== --- trunk/CopyBOM.php 2013-07-19 09:30:09 UTC (rev 6111) +++ trunk/CopyBOM.php 2013-07-19 10:07:00 UTC (rev 6112) @@ -177,7 +177,7 @@ </tr>'; echo '<tr> <td><input type="radio" name="NewOrExisting" value="N" />' . _(' To New Stock ID') . '</td>'; - echo '<td><input type="text" maxlength="20" name="ToStockID" /></td></tr>'; + echo '<td><input type="text" maxlength="20" autofocus="autofocus" pattern="[a-zA-Z0-9_\-]*" name="ToStockID" title="' . _('Enter a new item code to copy the existing item and its bill of material to. Item codes can contain only alpha-numeric characters, underscore or hyphens.') . '" /></td></tr>'; $sql = "SELECT stockid, description @@ -188,7 +188,7 @@ if (DB_num_rows($result) > 0) { echo '<tr> - <td><input type="radio" name="NewOrExisting" value="E" />'._('To Existing Stock ID') . '</td><td>'; + <td><input type="radio" name="NewOrExisting" checked="checked" value="E" />'._('To Existing Stock ID') . '</td><td>'; echo '<select name="ExStockID">'; while($myrow = DB_fetch_row($result)) { echo '<option value="'.$myrow[0].'">'.$myrow[0].' -- '.$myrow[1].'</option>'; Modified: trunk/CounterReturns.php ==========================================================... [truncated message content] |