From: <dai...@us...> - 2013-07-25 06:32:28
|
Revision: 6144 http://sourceforge.net/p/web-erp/reponame/6144 Author: daintree Date: 2013-07-25 06:32:24 +0000 (Thu, 25 Jul 2013) Log Message: ----------- html5 work Modified Paths: -------------- trunk/GLBalanceSheet.php trunk/ImportBankTrans.php trunk/ImportBankTransAnalysis.php trunk/Locations.php trunk/MRP.php trunk/MRPCalendar.php trunk/MRPPlannedPurchaseOrders.php trunk/MRPPlannedWorkOrders.php trunk/MRPReport.php trunk/MailingGroupMaintenance.php trunk/MaintenanceReminders.php trunk/MaintenanceTasks.php trunk/Manufacturers.php trunk/WWW_Users.php Modified: trunk/GLBalanceSheet.php =================================================================== --- trunk/GLBalanceSheet.php 2013-07-24 11:04:00 UTC (rev 6143) +++ trunk/GLBalanceSheet.php 2013-07-25 06:32:24 UTC (rev 6144) @@ -23,14 +23,15 @@ echo '<div class="page_help_text">' . _('Balance Sheet (or statement of financial position) is a summary of balances. Assets, liabilities and ownership equity are listed as of a specific date, such as the end of its financial year. Of the four basic financial statements, the balance sheet is the only statement which applies to a single point in time.') . '<br />' . _('The balance sheet has three parts: assets, liabilities and ownership equity. The main categories of assets are listed first and are followed by the liabilities. The difference between the assets and the liabilities is known as equity or the net assets or the net worth or capital of the company and according to the accounting equation, net worth must equal assets minus liabilities.') . '<br />' - . _('webERP is an "accrual" based system (not a "cash based" system). Accrual systems include items when they are invoiced to the customer, and when expenses are owed based on the supplier invoice date.') . '</div> - <form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '"> - <div> - <input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" /> - <table class="selection"> + . _('webERP is an "accrual" based system (not a "cash based" system). Accrual systems include items when they are invoiced to the customer, and when expenses are owed based on the supplier invoice date.') . '</div>'; + + 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 '<table class="selection"> <tr> <td>'._('Select the balance date').':</td> - <td><select required="required" autofocus="autofocus" name="BalancePeriodEnd">'; + <td><select required="required" name="BalancePeriodEnd">'; $periodno=GetPeriod(Date($_SESSION['DefaultDateFormat']), $db); $sql = "SELECT lastdate_in_period FROM periods WHERE periodno='".$periodno . "'"; @@ -53,14 +54,17 @@ echo '<tr> <td>'._('Detail Or Summary').':</td> - <td><select required="required" name="Detail"> + <td><select required="required" name="Detail" title="' . _('Selecting Summary will show on the totals at the account group level') . '" > <option value="Summary">'._('Summary') . '</option> <option selected="selected" value="Detailed">'._('All Accounts') . '</option> </select></td> - </tr>'; + </tr> + <tr> + <td>' . _('Show all Accounts including zero balances') . '</td> + <td><input type="checkbox" title="' . _('Check this box to display all accounts including those accounts with no balance') . '" name="ShowZeroBalances"></td> + </tr> + </table>'; - echo '</table>'; - echo '<br /> <div class="centre"> <input type="submit" name="ShowBalanceSheet" value="'._('Show on Screen (HTML)').'" /> @@ -218,9 +222,9 @@ $LeftOvers = $pdf->addTextWrap($Left_Margin+250,$YPos,100,$FontSize,locale_number_format($SectionBalance,$_SESSION['CompanyRecord']['decimalplaces']),'right'); $LeftOvers = $pdf->addTextWrap($Left_Margin+350,$YPos,100,$FontSize,locale_number_format($SectionBalanceLY,$_SESSION['CompanyRecord']['decimalplaces']),'right'); $YPos -= (2 * $line_height); - if ($YPos < $Bottom_Margin){ - include('includes/PDFBalanceSheetPageHeader.inc'); - } + if ($YPos < $Bottom_Margin){ + include('includes/PDFBalanceSheetPageHeader.inc'); + } } $SectionBalanceLY = 0; $SectionBalance = 0; @@ -237,11 +241,11 @@ } if ($myrow['groupname']!= $ActGrp){ - if ($YPos < $Bottom_Margin + $line_height){ - include('includes/PDFBalanceSheetPageHeader.inc'); - } - $FontSize =8; - $pdf->setFont('','B'); + if ($YPos < $Bottom_Margin + $line_height){ + include('includes/PDFBalanceSheetPageHeader.inc'); + } + $FontSize =8; + $pdf->setFont('','B'); if ($myrow['parentgroupname']==$ActGrp AND $ActGrp!=''){ $Level++; } @@ -266,14 +270,16 @@ $CheckTotal += $AccountBalance; - if ($_POST['Detail']=='Detailed'){ - $FontSize =8; - $pdf->setFont('',''); - $LeftOvers = $pdf->addTextWrap($Left_Margin,$YPos,50,$FontSize,$myrow['accountcode']); - $LeftOvers = $pdf->addTextWrap($Left_Margin+55,$YPos,200,$FontSize,$myrow['accountname']); - $LeftOvers = $pdf->addTextWrap($Left_Margin+250,$YPos,100,$FontSize,locale_number_format($AccountBalance,$_SESSION['CompanyRecord']['decimalplaces']),'right'); - $LeftOvers = $pdf->addTextWrap($Left_Margin+350,$YPos,100,$FontSize,locale_number_format($LYAccountBalance,$_SESSION['CompanyRecord']['decimalplaces']),'right'); - $YPos -= $line_height; + if ($_POST['Detail']=='Detailed') { + if (isset($_POST['ShowZeroBalances']) OR (!isset($_POST['ShowZeroBalances']) AND ($AccountBalance <> 0 OR $LYAccountBalance <> 0))){ + $FontSize =8; + $pdf->setFont('',''); + $LeftOvers = $pdf->addTextWrap($Left_Margin,$YPos,50,$FontSize,$myrow['accountcode']); + $LeftOvers = $pdf->addTextWrap($Left_Margin+55,$YPos,200,$FontSize,$myrow['accountname']); + $LeftOvers = $pdf->addTextWrap($Left_Margin+250,$YPos,100,$FontSize,locale_number_format($AccountBalance,$_SESSION['CompanyRecord']['decimalplaces']),'right'); + $LeftOvers = $pdf->addTextWrap($Left_Margin+350,$YPos,100,$FontSize,locale_number_format($LYAccountBalance,$_SESSION['CompanyRecord']['decimalplaces']),'right'); + $YPos -= $line_height; + } } if ($YPos < ($Bottom_Margin)){ include('includes/PDFBalanceSheetPageHeader.inc'); @@ -563,29 +569,30 @@ if ($_POST['Detail']=='Detailed'){ - - if ($k==1){ - echo '<tr class="OddTableRows">'; - $k=0; - } else { - echo '<tr class="EvenTableRows">'; - $k++; + if (isset($_POST['ShowZeroBalances']) OR (!isset($_POST['ShowZeroBalances']) AND ($AccountBalance <> 0 OR $LYAccountBalance <> 0))){ + if ($k==1){ + echo '<tr class="OddTableRows">'; + $k=0; + } else { + echo '<tr class="EvenTableRows">'; + $k++; + } + + $ActEnquiryURL = '<a href="' . $RootPath . '/GLAccountInquiry.php?Period=' . $_POST['BalancePeriodEnd'] . '&Account=' . $myrow['accountcode'] . '">' . $myrow['accountcode'] . '</a>'; + + printf('<td>%s</td> + <td>%s</td> + <td class="number">%s</td> + <td></td> + <td class="number">%s</td> + <td></td> + </tr>', + $ActEnquiryURL, + htmlspecialchars($myrow['accountname'],ENT_QUOTES,'UTF-8',false), + locale_number_format($AccountBalance,$_SESSION['CompanyRecord']['decimalplaces']), + locale_number_format($LYAccountBalance,$_SESSION['CompanyRecord']['decimalplaces'])); + $j++; } - - $ActEnquiryURL = '<a href="' . $RootPath . '/GLAccountInquiry.php?Period=' . $_POST['BalancePeriodEnd'] . '&Account=' . $myrow['accountcode'] . '">' . $myrow['accountcode'] . '</a>'; - - printf('<td>%s</td> - <td>%s</td> - <td class="number">%s</td> - <td></td> - <td class="number">%s</td> - <td></td> - </tr>', - $ActEnquiryURL, - htmlspecialchars($myrow['accountname'],ENT_QUOTES,'UTF-8',false), - locale_number_format($AccountBalance,$_SESSION['CompanyRecord']['decimalplaces']), - locale_number_format($LYAccountBalance,$_SESSION['CompanyRecord']['decimalplaces'])); - $j++; } } //end of loop Modified: trunk/ImportBankTrans.php =================================================================== --- trunk/ImportBankTrans.php 2013-07-24 11:04:00 UTC (rev 6143) +++ trunk/ImportBankTrans.php 2013-07-25 06:32:24 UTC (rev 6144) @@ -20,7 +20,7 @@ echo '<table> <tr> <td>'. _('MT940 format Bank Statement File to import').'</td> - <td><input type="file" id="ImportFile" name="ImportFile"></td> + <td><input type="file" id="ImportFile" autofocus="autofocus" required="required" title="' . _('Select the file that contains the bank transactions in MT940 format') . '" name="ImportFile"></td> </tr> </table>'; echo '<div class="centre"><input type="submit" name="Import" value="Process"></div>'; @@ -595,7 +595,7 @@ echo '<tr> <td>' . _('Exchange Rate to Use When Processing Transactions') . '</td> - <td><input type="text" class="number" name="ExchangeRate" value="' . $_SESSION['Statement']->ExchangeRate . '" /></td> + <td><input type="text" class="number" required="required" name="ExchangeRate" value="' . $_SESSION['Statement']->ExchangeRate . '" /></td> </tr>'; } else { echo '<input type="hidden" name="ExchangeRate" value="1" />'; Modified: trunk/ImportBankTransAnalysis.php =================================================================== --- trunk/ImportBankTransAnalysis.php 2013-07-24 11:04:00 UTC (rev 6143) +++ trunk/ImportBankTransAnalysis.php 2013-07-25 06:32:24 UTC (rev 6144) @@ -167,7 +167,7 @@ $result = DB_query("SELECT debtorno, name FROM debtorsmaster - WHERE currcode='" . $_SESSION['Statement']->CurrCode . "' + WHERE currcode='" . $_SESSION['Statement']->CurrCode . "' ORDER BY name",$db); if ($_SESSION['Trans'][$TransID]->DebtorNo ==''){ echo '<option selected value="">' . _('GL Receipt') . '</option>'; @@ -261,7 +261,7 @@ } echo '<tr> <td>' . _('Account Code') . ':</td> - <td><input type="text" name="GLCode" size=12 maxlength=11 value="' . $_POST['GLCode'] . '"></td> + <td><input type="text" name="GLCode" size="12" required="required" maxlength="11" value="' . $_POST['GLCode'] . '"></td> </tr>'; echo '<tr> <td>' . _('Account Selection') . ':<br />(' . _('If you know the code enter it above') . '<br />' . _('otherwise select the account from the list') . ')</td> @@ -286,7 +286,7 @@ } echo '<tr> <td>' . _('Amount') . ':</td> - <td><input type="text" class="number" name="Amount" size="12" maxlength="11" value="' . $_POST['Amount'] . '"></td> + <td><input type="text" class="number" name="Amount" required="required" size="12" maxlength="11" value="' . locale_number_format($_POST['Amount'],$_SESSION['Statement']->CurrDecimalPlaces) . '"></td> </tr>'; if (!isset($_POST['Narrative'])) { Modified: trunk/Locations.php =================================================================== --- trunk/Locations.php 2013-07-24 11:04:00 UTC (rev 6143) +++ trunk/Locations.php 2013-07-25 06:32:24 UTC (rev 6144) @@ -497,7 +497,7 @@ </tr>'; echo '<tr> <td>' . _('Location Code') . ':</td> - <td><input type="text" name="LocCode" value="' . $_POST['LocCode'] . '" size="5" maxlength="5" /></td> + <td><input type="text" autofocus="autofocus" required="required" title="' . _('Enter up to five characters for the inventory location code') . '" pattern="[0-9a-zA-Z_]*" name="LocCode" value="' . $_POST['LocCode'] . '" size="5" maxlength="5" /></td> </tr>'; } if (!isset($_POST['LocationName'])) { @@ -545,11 +545,11 @@ echo '<tr> <td>' . _('Location Name') . ':' . '</td> - <td><input type="text" name="LocationName" value="'. $_POST['LocationName'] . '" size="51" maxlength="50" /></td> + <td><input type="text" name="LocationName" required="required" value="'. $_POST['LocationName'] . '" title="' . _('Enter the inventory location name this could be either a warehouse or a factory') . '" namesize="51" maxlength="50" /></td> </tr> <tr> <td>' . _('Contact for deliveries') . ':' . '</td> - <td><input type="text" name="Contact" value="' . $_POST['Contact'] . '" size="31" maxlength="30" /></td> + <td><input type="text" name="Contact" required="required" value="' . $_POST['Contact'] . '" title="' . _('Enter the name of the responsible person to contact for this inventory location') . '" size="31" maxlength="30" /></td> </tr> <tr> <td>' . _('Delivery Address 1') . ':' . '</td> @@ -577,15 +577,15 @@ </tr> <tr> <td>' . _('Telephone No') . ':' . '</td> - <td><input type="text" name="Tel" value="' . $_POST['Tel'] . '" size="31" maxlength="30" /></td> + <td><input type="tel" name="Tel" pattern="[0-9\+\s]*]" value="' . $_POST['Tel'] . '" size="31" maxlength="30" /></td> </tr> <tr> <td>' . _('Facsimile No') . ':' . '</td> - <td><input type="text" name="Fax" value="' . $_POST['Fax'] . '" size="31" maxlength="30" /></td> + <td><input type="tel" name="Fax" pattern="[0-9\+\s]*]" value="' . $_POST['Fax'] . '" size="31" maxlength="30" /></td> </tr> <tr> <td>' . _('Email') . ':' . '</td> - <td><input type="text" name="Email" value="' . $_POST['Email'] . '" size="31" maxlength="55" /></td> + <td><input type="email" name="Email" value="' . $_POST['Email'] . '" size="31" maxlength="55" /></td> </tr> <tr> <td>' . _('Tax Province') . ':' . '</td> @@ -604,11 +604,11 @@ </tr> <tr> <td>' . _('Default Counter Sales Customer Code') . ':' . '</td> - <td><input type="text" name="CashSaleCustomer" value="' . $_POST['CashSaleCustomer'] . '" size="11" maxlength="10" /></td> + <td><input type="text" name="CashSaleCustomer" pattern="[0-9a-zA-Z_]*" title="' . _('If counter sales are being used for this location then an existing customer account code needs to be entered here. All sales created from the counter sales will be recorded against this customer account') . '" value="' . $_POST['CashSaleCustomer'] . '" size="11" maxlength="10" /></td> </tr> <tr> <td>' . _('Counter Sales Branch Code') . ':' . '</td> - <td><input type="text" name="CashSaleBranch" value="' . $_POST['CashSaleBranch'] . '" size="11" maxlength="10" /></td> + <td><input type="text" name="CashSaleBranch" pattern="[0-9a-zA-Z_]*" title="' . _('If counter sales are being used for this location then an existing customer branch code for the customer account code entered above needs to be entered here. All sales created from the counter sales will be recorded against this branch') . '" value="' . $_POST['CashSaleBranch'] . '" size="11" maxlength="10" /></td> </tr>'; echo '<tr> <td>' . _('Allow internal requests?') . ':</td> Modified: trunk/MRP.php =================================================================== --- trunk/MRP.php 2013-07-24 11:04:00 UTC (rev 6143) +++ trunk/MRP.php 2013-07-25 06:32:24 UTC (rev 6144) @@ -301,7 +301,7 @@ FROM mrpdemands, stockmaster WHERE mrpdemands.stockid = stockmaster.stockid AND stockmaster.discontinued = 0"; - if ($_POST['usemrpdemands'] == 'y') { + if ($_POST['UserMRPDemands'] == 'y') { $result = DB_query($sql,$db); prnMsg(_('Loading requirements based on mrpdemands'),'info'); flush(); @@ -515,10 +515,10 @@ leeway) VALUES ('" . date('Y-m-d') . "', '" . $locparm . "', - '" . $_POST['pansizeflag'] . "', - '" . $_POST['shrinkageflag'] . "', - '" . $_POST['eoqflag'] . "', - '" . $_POST['usemrpdemands'] . "', + '" . $_POST['PanSizeFlag'] . "', + '" . $_POST['ShrinkageFlag'] . "', + '" . $_POST['EOQFlag'] . "', + '" . $_POST['UserMRPDemands'] . "', '" . filter_number_format($_POST['Leeway']) . "')"; $result = DB_query($sql,$db); @@ -534,10 +534,10 @@ $myrow = DB_fetch_array($result); - $leeway = $myrow['leeway']; - $usemrpdemands = _('No'); + $Leeway = $myrow['leeway']; + $UserMRPDemands = _('No'); if ($myrow['usemrpdemands'] == 'y') { - $usemrpdemands = _('Yes'); + $UserMRPDemands = _('Yes'); } $useeoq = _('No'); if ($myrow['eoqflag'] == 'y') { @@ -564,11 +564,11 @@ </tr> <tr> <td>' . _('Days Leeway') . ':</td> - <td>' . $leeway . '</td> + <td>' . $Leeway . '</td> </tr> <tr> <td>' . _('Use MRP Demands') . ':</td> - <td>' . $usemrpdemands . '</td> + <td>' . $UserMRPDemands . '</td> </tr> <tr> <td>' . _('Use EOQ') . ':</td> @@ -593,40 +593,40 @@ </tr> <tr> <td>' . _('Location') . '</td> - <td><select name="location[]" multiple="multiple"> + <td><select required="required" autofocus="autofocus" name="location[]" multiple="multiple"> <option value="All" selected="selected">' . _('All') . '</option>'; $sql = "SELECT loccode, locationname FROM locations"; - $result = DB_query($sql,$db); - while ($myrow = DB_fetch_array($result)) { + $Result = DB_query($sql,$db); + while ($myrow = DB_fetch_array($Result)) { echo '<option value="'; echo $myrow['loccode'] . '">' . $myrow['locationname'] . '</option>'; } //end while loop echo '</select></td></tr>'; - if (!isset($leeway)){ - $leeway =0; + if (!isset($Leeway)){ + $Leeway =0; } echo '<tr> <td>' . _('Days Leeway') . ':</td> - <td><input type="text" name="Leeway" class="number" size="4" value="' . $leeway . '" /></td> + <td><input type="text" required="required" name="Leeway" class="integer" size="4" value="' . $Leeway . '" /></td> </tr> <tr> <td>' ._('Use MRP Demands?') . ':</td> - <td><input type="checkbox" name="usemrpdemands" value="y" checked="checked" /></td> + <td><input type="checkbox" name="UserMRPDemands" value="y" checked="checked" /></td> </tr> <tr> <td>' ._('Use EOQ?') . ':</td> - <td><input type="checkbox" name="eoqflag" value="y" checked="checked" /></td> + <td><input type="checkbox" name="EOQFlag" value="y" checked="checked" /></td> </tr> <tr> <td>' ._('Use Pan Size?') . ':</td> - <td><input type="checkbox" name="pansizeflag" value="y" checked="checked" /></td> + <td><input type="checkbox" name="PanSizeFlag" value="y" checked="checked" /></td> </tr> <tr> <td>' ._('Use Shrinkage?') . ':</td> - <td><input type="checkbox" name="shrinkageflag" value="y" checked="checked" /></td> + <td><input type="checkbox" name="ShrinkageFlag" value="y" checked="checked" /></td> </tr> </table> <div class="centre"> @@ -753,7 +753,7 @@ foreach($Requirements as $Requirement) { // First, inflate requirement if there is a shrinkage factor // Should the quantity be rounded? - if ($_POST['shrinkageflag'] == 'y' AND $ShrinkFactor > 0) { + if ($_POST['ShrinkageFlag'] == 'y' AND $ShrinkFactor > 0) { $Requirement['quantity'] = ($Requirement['quantity'] * 100) / (100 - $ShrinkFactor); $Requirement['quantity'] = round($Requirement['quantity'],$DecimalPlaces); } @@ -765,7 +765,7 @@ $ExcessQty = 0; } if ($PlannedQty > 0) { - if ($_POST['eoqflag'] == 'y' AND $eoq > $PlannedQty) { + if ($_POST['EOQFlag'] == 'y' AND $eoq > $PlannedQty) { $ExcessQty = $eoq - $PlannedQty; $PlannedQty = $eoq; } @@ -775,7 +775,7 @@ // multiplied by the pansize. For instance, with a planned qty of 17 with a pansize // of 5, divide 17 by 5 to get 3 with a remainder of 2, which is rounded up to 4 // and then multiplied by 5 - the pansize - to get 20 - if ($_POST['pansizeflag'] == 'y' AND $PanSize != 0 AND $PlannedQty != 0) { + if ($_POST['PanSizeFlag'] == 'y' AND $PanSize != 0 AND $PlannedQty != 0) { $PlannedQty = ceil($PlannedQty / $PanSize) * $PanSize; } Modified: trunk/MRPCalendar.php =================================================================== --- trunk/MRPCalendar.php 2013-07-24 11:04:00 UTC (rev 6143) +++ trunk/MRPCalendar.php 2013-07-25 06:32:24 UTC (rev 6144) @@ -25,10 +25,10 @@ submit($db,$ChangeDate); } elseif (isset($_POST['update'])) { update($db,$ChangeDate); -} elseif (isset($_POST['listall'])) { - listall($db); +} elseif (isset($_POST['ListAll'])) { + ShowDays($db); } else { - display($db,$ChangeDate); + ShowInputForm($db,$ChangeDate); } function submit(&$db,&$ChangeDate) //####SUBMIT_SUBMIT_SUBMIT_SUBMIT_SUBMIT_SUBMIT_SUBMIT_SUBMIT#### @@ -70,7 +70,7 @@ } if ($InputError == 1) { - display($db,$ChangeDate); + ShowInputForm($db,$ChangeDate); return; } @@ -135,7 +135,7 @@ $resultupdate = DB_query($sql,$db,$ErrMsg); } prnMsg(_('The MRP Calendar has been created'),'success'); - display($db,$ChangeDate); + ShowInputForm($db,$ChangeDate); } // End of function submit() @@ -158,7 +158,7 @@ } if ($InputError == 1) { - display($db,$ChangeDate); + ShowInputForm($db,$ChangeDate); return; } @@ -175,7 +175,7 @@ $resultupdate = DB_query($sql,$db,$ErrMsg); prnMsg(_('The MRP calendar record for') . ' ' . $ChangeDate . ' ' . _('has been updated'),'success'); unset ($ChangeDate); - display($db,$ChangeDate); + ShowInputForm($db,$ChangeDate); // Have to update daynumber any time change a date from or to a manufacturing date // Update daynumber. Set it so non-manufacturing days will have the same daynumber as a valid @@ -197,7 +197,7 @@ } // End of function update() -function listall(&$db) {//####LISTALL_LISTALL_LISTALL_LISTALL_LISTALL_LISTALL_LISTALL_#### +function ShowDays(&$db) {//####LISTALL_LISTALL_LISTALL_LISTALL_LISTALL_LISTALL_LISTALL_#### // List all records in date range $FromDate = FormatDateForSQL($_POST['FromDate']); @@ -238,12 +238,12 @@ echo '</table>'; echo '<br /><br />'; unset ($ChangeDate); - display($db,$ChangeDate); + ShowInputForm($db,$ChangeDate); -} // End of function listall() +} // End of function ShowDays() -function display(&$db,&$ChangeDate) {//####DISPLAY_DISPLAY_DISPLAY_DISPLAY_DISPLAY_DISPLAY_##### +function ShowInputForm(&$db,&$ChangeDate) {//####DISPLAY_DISPLAY_DISPLAY_DISPLAY_DISPLAY_DISPLAY_##### // Display form fields. This function is called the first time // the page is called, and is also invoked at the end of all of the other functions. @@ -262,9 +262,9 @@ echo '<tr> <td>' . _('From Date') . ':</td> - <td><input type="text" class="date" alt="' . $_SESSION['DefaultDateFormat'] .'" name="FromDate" size="10" maxlength="10" value="' . $_POST['FromDate'] . '" /></td></tr> + <td><input type="text" class="date" alt="' . $_SESSION['DefaultDateFormat'] .'" name="FromDate" required="required" autofocus="autofocus" size="10" maxlength="10" value="' . $_POST['FromDate'] . '" /></td></tr> <tr><td>' . _('To Date') . ':</td> - <td><input type="text" class="date" alt="' . $_SESSION['DefaultDateFormat'] .'" name="ToDate" size="10" maxlength="10" value="' . $_POST['ToDate'] . '" /></td> + <td><input type="text" class="date" alt="' . $_SESSION['DefaultDateFormat'] .'" name="ToDate" required="required" size="10" maxlength="10" value="' . $_POST['ToDate'] . '" /></td> </tr> <tr><td></td></tr> <tr><td></td></tr> @@ -300,7 +300,7 @@ </table><br /> <div class="centre"> <input type="submit" name="submit" value="' . _('Create Calendar') . '" /> - <input type="submit" name="listall" value="' . _('List Date Range') . '" /> + <input type="submit" name="ListAll" value="' . _('List Date Range') . '" /> </div>'; if (!isset($_POST['ChangeDate'])) { @@ -320,7 +320,7 @@ </div> </form>'; -} // End of function display() +} // End of function ShowInputForm() include('includes/footer.inc'); ?> Modified: trunk/MRPPlannedPurchaseOrders.php =================================================================== --- trunk/MRPPlannedPurchaseOrders.php 2013-07-24 11:04:00 UTC (rev 6143) +++ trunk/MRPPlannedPurchaseOrders.php 2013-07-25 06:32:24 UTC (rev 6144) @@ -268,18 +268,31 @@ <div>'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<table class="selection">'; - echo '<tr><td>' . _('Consolidation') . ':</td><td><select name="Consolidation">'; - echo '<option selected="selected" value="None">' . _('None') . '</option>'; - echo '<option value="Weekly">' . _('Weekly') . '</option>'; - echo '<option value="Monthly">' . _('Monthly') . '</option>'; - echo '</select></td></tr>'; - echo '<tr><td>' . _('Print Option') . ':</td><td><select name="Fill">'; - echo '<option selected="selected" value="yes">' . _('Print With Alternating Highlighted Lines') . '</option>'; - echo '<option value="no">' . _('Plain Print') . '</option>'; - echo '</select></td></tr>'; - echo '<tr><td>' . _('Cut Off Date') . ':</td><td><input type ="text" class="date" alt="'.$_SESSION['DefaultDateFormat'] . - '" name="cutoffdate" size="10" value="'.date($_SESSION['DefaultDateFormat']).'" /></td></tr>'; - echo '</table><br /><div class="centre"><input type="submit" name="PrintPDF" value="' . _('Print PDF') . '" /></div> + echo '<tr> + <td>' . _('Consolidation') . ':</td> + <td><select required="required" name="Consolidation"> + <option selected="selected" value="None">' . _('None') . '</option> + <option value="Weekly">' . _('Weekly') . '</option> + <option value="Monthly">' . _('Monthly') . '</option> + </select></td> + </tr> + <tr> + <td>' . _('Print Option') . ':</td> + <td><select name="Fill"> + <option selected="selected" value="yes">' . _('Print With Alternating Highlighted Lines') . '</option> + <option value="no">' . _('Plain Print') . '</option> + </select></td> + </tr> + <tr> + <td>' . _('Cut Off Date') . ':</td> + <td><input type ="text" required="required" class="date" alt="'.$_SESSION['DefaultDateFormat'] . + '" name="cutoffdate" size="10" value="'.date($_SESSION['DefaultDateFormat']).'" /></td> + </tr> + </table> + <br /> + <div class="centre"> + <input type="submit" name="PrintPDF" value="' . _('Print PDF') . '" /> + </div> </div> </form>'; Modified: trunk/MRPPlannedWorkOrders.php =================================================================== --- trunk/MRPPlannedWorkOrders.php 2013-07-24 11:04:00 UTC (rev 6143) +++ trunk/MRPPlannedWorkOrders.php 2013-07-25 06:32:24 UTC (rev 6144) @@ -324,22 +324,30 @@ echo '<div>'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<table class="selection">'; - echo '<tr><td>' . _('Consolidation') . ':</td><td><select name="Consolidation">'; - echo '<option selected="selected" value="None">' . _('None') . '</option>'; - echo '<option value="Weekly">' . _('Weekly') . '</option>'; - echo '<option value="Monthly">' . _('Monthly') . '</option>'; - echo '</select></td></tr>'; - - echo '<tr><td>' . _('Print Option') . ':</td><td><select name="Fill">'; - echo '<option selected="selected" value="yes">' . _('Print With Alternating Highlighted Lines') . '</option>'; - echo '<option value="no">' . _('Plain Print') . '</option>'; - echo '</select></td></tr>'; - - echo '<tr><td>' . _('Cut Off Date') . ':</td> - <td><input type ="text" class="date" alt="' .$_SESSION['DefaultDateFormat'] .'" name="cutoffdate" size="10" value="' .date($_SESSION['DefaultDateFormat']).'" /></td> - </tr>'; - echo '</table><div class="centre"><input type="submit" name="Review" value="' . _('Review') . '" /> <input type="submit" name="PrintPDF" value="' . _('Print PDF') . '" /></div>'; - echo '</div> + echo '<tr> + <td>' . _('Consolidation') . ':</td> + <td><select name="Consolidation"> + <option selected="selected" value="None">' . _('None') . '</option> + <option value="Weekly">' . _('Weekly') . '</option> + <option value="Monthly">' . _('Monthly') . '</option> + </select></td> + </tr> + <tr> + <td>' . _('Print Option') . ':</td><td> + <select name="Fill"> + <option selected="selected" value="yes">' . _('Print With Alternating Highlighted Lines') . '</option> + <option value="no">' . _('Plain Print') . '</option> + </select></td> + </tr> + <tr> + <td>' . _('Cut Off Date') . ':</td> + <td><input type ="text" class="date" alt="' .$_SESSION['DefaultDateFormat'] .'" name="cutoffdate" required="required" autofocus="autofocus" size="10" value="' .date($_SESSION['DefaultDateFormat']).'" /></td> + </tr> + </table> + <div class="centre"> + <input type="submit" name="Review" value="' . _('Review') . '" /> <input type="submit" name="PrintPDF" value="' . _('Print PDF') . '" /> + </div> + </div> </form>'; include('includes/footer.inc'); Modified: trunk/MRPReport.php =================================================================== --- trunk/MRPReport.php 2013-07-24 11:04:00 UTC (rev 6143) +++ trunk/MRPReport.php 2013-07-25 06:32:24 UTC (rev 6144) @@ -535,9 +535,9 @@ echo '</select></td>'; echo '<td>' . _('Enter partial') . '<b> ' . _('Description') . '</b>:</td><td>'; if (isset($_POST['Keywords'])) { - echo '<input type="text" name="Keywords" value="' . $_POST['Keywords'] . '" size="20" maxlength="25" />'; + echo '<input type="text" autofocus="autofocus" name="Keywords" value="' . $_POST['Keywords'] . '" size="20" maxlength="25" />'; } else { - echo '<input type="text" name="Keywords" size="20" maxlength="25" />'; + echo '<input type="text" autofocus="autofocus" name="Keywords" size="20" maxlength="25" />'; } echo '</td></tr><tr><td></td>'; echo '<td><h3><b>' . _('OR') . ' ' . '</b></h3>' . _('Enter partial') . ' <b>' . _('Stock Code') . '</b>:</td>'; Modified: trunk/MailingGroupMaintenance.php =================================================================== --- trunk/MailingGroupMaintenance.php 2013-07-24 11:04:00 UTC (rev 6143) +++ trunk/MailingGroupMaintenance.php 2013-07-25 06:32:24 UTC (rev 6144) @@ -140,7 +140,7 @@ <form id="MailGroups" action="<?php echo htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8'); ?>" method="post" /> <input type="hidden" name="FormID" value="<?php echo $_SESSION['FormID']; ?>" /> <label for="MailGroup"><?php echo _('Mail Group'); ?></label> - <input type="text" name="MailGroup" maxlength="100" size="20" /> + <input type="text" required="required" autofocus="autofocus" name="MailGroup" maxlength="100" size="20" /> <input type="hidden" name="Clean" value="1" /> <input type="submit" name="Enter" value="<?php echo _('Submit'); ?>" /> </form> @@ -233,7 +233,7 @@ ?> <td><?php echo $myrow['userid']; ?></td> <td><?php echo $myrow['realname']; ?></td> - <td><a href="<?php echo htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8').'?UserId='.$myrow['userid'].'&GroupName='.$GroupName.'&Remove=1&GroupId='.$GroupId; ?>" onclick="return confirm('Are you sure to remove this users?'); " /><?php echo _('Remove'); ?></a></td> + <td><a href="<?php echo htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8').'?UserId='.$myrow['userid'].'&GroupName='.$GroupName.'&Remove=1&GroupId='.$GroupId; ?>" onclick="return confirm('" . _('Are you sure you wish to remove this user from this mail group?'). "); " /><?php echo _('Remove'); ?></a></td> <td> </td> <td> </td> <td> </td> @@ -251,8 +251,8 @@ ?> </tr> - + <?php } ?> Modified: trunk/MaintenanceReminders.php =================================================================== --- trunk/MaintenanceReminders.php 2013-07-24 11:04:00 UTC (rev 6143) +++ trunk/MaintenanceReminders.php 2013-07-25 06:32:24 UTC (rev 6144) @@ -26,7 +26,7 @@ if ($LastUserResponsible!=''){ ${'Mail' . $myrow['userresponsible']}->setText($MailText); $SendResult = ${'Mail' . $myrow['userresponsible']}->send(array($LastUserEmail)); - $MailText = "You have the following maintenance task(s) falling due or over-due:\n"; + $MailText = _('You have the following maintenance task(s) falling due or over-due:') . "\n"; } $LastUserResponsible = $myrow['userresponsible']; $LastUserEmail = $myrow['email']; @@ -74,7 +74,7 @@ ${'Mail' . $myrow['manager']}->setSubject('Overdue Maintenance Tasks Reminder'); ${'Mail' . $myrow['manager']}->setFrom('Do_not_reply <>'); } - $MailText .= "Asset: " . $myrow['description'] . "\nTask: " . $myrow['taskdescription'] . "\nDue: " . ConvertSQLDate($myrow['duedate']); + $MailText .= _('Asset:') .' ' . $myrow['description'] . "\n" . _('Task:') . ' ' . $myrow['taskdescription'] . "\n" . _('Due:') . ' ' . ConvertSQLDate($myrow['duedate']); $MailText . "\n\n"; } if (DB_num_rows($result)>0){ Modified: trunk/MaintenanceTasks.php =================================================================== --- trunk/MaintenanceTasks.php 2013-07-24 11:04:00 UTC (rev 6143) +++ trunk/MaintenanceTasks.php 2013-07-25 06:32:24 UTC (rev 6144) @@ -130,7 +130,8 @@ if (isset($_GET['Edit'])) { echo '<tr> - <td>'._('Task ID').'</td><td>'.$_GET['TaskID'].'</td> + <td>'._('Task ID').'</td> + <td>'.$_GET['TaskID'].'</td> </tr>'; echo '<input type="hidden" name="TaskID" value="'.$_GET['TaskID'].'" />'; $sql="SELECT assetid, @@ -169,7 +170,7 @@ echo '<tr> <td>'._('Asset to Maintain').':</td> - <td><select name="AssetID">'; + <td><select required="required" name="AssetID">'; $AssetSQL="SELECT assetid, description FROM fixedassets"; $AssetResult=DB_query($AssetSQL,$db); while ($myrow=DB_fetch_array($AssetResult)) { @@ -184,17 +185,17 @@ echo '<tr> <td>'._('Task Description').':</td> - <td><textarea name="TaskDescription" cols="40" rows="3">' . $_POST['TaskDescription'] . '</textarea></td> + <td><textarea name="TaskDescription" required="required" cols="40" rows="3">' . $_POST['TaskDescription'] . '</textarea></td> </tr>'; echo '<tr> <td>'._('Days Before Task Due').':</td> - <td><input type="text" class="number" name="FrequencyDays" size="5" maxlength="5" value="' . $_POST['FrequencyDays'] . '" /></td> + <td><input type="text" class="integer" required="required" name="FrequencyDays" size="5" maxlength="5" value="' . $_POST['FrequencyDays'] . '" /></td> </tr>'; echo '<tr> <td>'._('Responsible').':</td> - <td><select name="UserResponsible">'; + <td><select required="required" name="UserResponsible">'; $UserSQL="SELECT userid FROM www_users"; $UserResult=DB_query($UserSQL,$db); while ($myrow=DB_fetch_array($UserResult)) { @@ -209,7 +210,7 @@ echo '<tr> <td>'._('Manager').':</td> - <td><select name="Manager">'; + <td><select required="required" name="Manager">'; if ($_POST['Manager']==''){ echo '<option selected="selected" value="">' . _('No Manager') . '</option>'; } else { Modified: trunk/Manufacturers.php =================================================================== --- trunk/Manufacturers.php 2013-07-24 11:04:00 UTC (rev 6143) +++ trunk/Manufacturers.php 2013-07-25 06:32:24 UTC (rev 6144) @@ -290,7 +290,7 @@ echo '<tr> <td>' . _('Brand Name') . ':' . '</td> - <td><input type="text" name="ManufacturersName" value="'. $_POST['ManufacturersName'] . '" size="32" maxlength="32" /></td> + <td><input type="text" required="required" autofocus="autofocus" name="ManufacturersName" value="'. $_POST['ManufacturersName'] . '" size="32" maxlength="32" /></td> </tr> <tr> <td>' . _('Brand URL') . ':' . '</td> Modified: trunk/WWW_Users.php =================================================================== --- trunk/WWW_Users.php 2013-07-24 11:04:00 UTC (rev 6143) +++ trunk/WWW_Users.php 2013-07-25 06:32:24 UTC (rev 6144) @@ -420,7 +420,7 @@ echo '<table class="selection"> <tr> <td>' . _('User Login') . ':</td> - <td><input pattern="(?!^([aA]{1}[dD]{1}[mM]{1}[iI]{1}[nN]{1})$)[^?+.&\\>< ]{4,}" type="text" required="true" name="UserID" size="22" maxlength="20" placeholder="'._('Not less than 4 characters').'" title="'._('Please input not less than 4 characters and canot be admin or contains illegal characters').'" /></td> + <td><input pattern="(?!^([aA]{1}[dD]{1}[mM]{1}[iI]{1}[nN]{1})$)[^?+.&\\>< ]{4,}" type="text" required="required" name="UserID" size="22" maxlength="20" placeholder="'._('Not less than 4 characters').'" title="'._('Please input not less than 4 characters and canot be admin or contains illegal characters').'" /></td> </tr>'; /*set the default modules to show to all @@ -452,19 +452,19 @@ } echo '<tr> <td>' . _('Password') . ':</td> - <td><input type="password" pattern=".{5,}" name="Password" size="22" maxlength="20" value="' . $_POST['Password'] . '" placeholder="'._('not less than 5 characters').'" title="'._('Please enter not less than 5 characters and cannot same as users id').'" /></td> + <td><input type="password" pattern=".{5,}" reuired="required" name="Password" size="22" maxlength="20" value="' . $_POST['Password'] . '" placeholder="'._('not less than 5 characters').'" title="'._('Please enter not less than 5 characters and cannot same as the users id').'" /></td> </tr>'; echo '<tr> <td>' . _('Full Name') . ':</td> - <td><input type="text" name="RealName" value="' . $_POST['RealName'] . '" size="36" maxlength="35" /></td> + <td><input type="text" name="RealName" required="required" value="' . $_POST['RealName'] . '" size="36" maxlength="35" /></td> </tr>'; echo '<tr> <td>' . _('Telephone No') . ':</td> - <td><input name="Phone" value="' . $_POST['Phone'] . '" size="32" maxlength="30" /></td> + <td><input type="tel" name="Phone" pattern="[0-9+\s]*" value="' . $_POST['Phone'] . '" size="32" maxlength="30" /></td> </tr>'; echo '<tr> <td>' . _('Email Address') .':</td> - <td><input type="email" name="Email" value="' . $_POST['Email'] .'" size="32" maxlength="55" title="'._('The input must be email').'" /></td> + <td><input type="email" name="Email" required="required" value="' . $_POST['Email'] .'" size="32" maxlength="55" title="'._('A valid email address is required').'" /></td> </tr>'; echo '<tr> <td>' . _('Security Role') . ':</td> @@ -482,7 +482,9 @@ </tr>'; -echo '<tr><td>' . _('User Can Create Tenders') . ':</td><td><select name="CanCreateTender">'; +echo '<tr> + <td>' . _('User Can Create Tenders') . ':</td> + <td><select name="CanCreateTender">'; if ($_POST['CanCreateTender']==0){ echo '<option selected="selected" value="0">' . _('No') . '</option>'; @@ -522,17 +524,17 @@ } echo '<tr> <td>' . _('Customer Code') . ':</td> - <td><input type="text" name="Cust" size="10" maxlength="10" value="' . $_POST['Cust'] . '" /></td> + <td><input type="text" name="Cust" pattern="[0-9a-zA-Z_]*" title="' . _('If this user login is to be associated with a customer account, enter the customer account code') . '" size="10" maxlength="10" value="' . $_POST['Cust'] . '" /></td> </tr>'; echo '<tr> <td>' . _('Branch Code') . ':</td> - <td><input type="text" name="BranchCode" size="10" maxlength="10" value="' . $_POST['BranchCode'] .'" /></td> + <td><input type="text" name="BranchCode" pattern="[0-9a-zA-Z_]*" title="' . _('If this user login is to be associated with a customer account a valid branch for the customer account must be entered.') . '" size="10" maxlength="10" value="' . $_POST['BranchCode'] .'" /></td> </tr>'; echo '<tr> <td>' . _('Supplier Code') . ':</td> - <td><input type="text" name="SupplierID" size="10" maxlength="10" value="' . $_POST['SupplierID'] .'" /></td> + <td><input type="text" name="SupplierID" pattern="[0-9a-zA-Z_]*" size="10" maxlength="10" value="' . $_POST['SupplierID'] .'" /></td> </tr>'; echo '<tr> @@ -609,7 +611,7 @@ echo '<tr> <td>' . _('Theme') . ':</td> - <td><select name="Theme">'; + <td><select required="required" name="Theme">'; $ThemeDirectories = scandir('css/'); @@ -634,7 +636,7 @@ echo '<tr> <td>' . _('Language') . ':</td> - <td><select name="UserLanguage">'; + <td><select required="required" name="UserLanguage">'; foreach ($LanguagesArray as $LanguageEntry => $LanguageName){ if (isset($_POST['UserLanguage']) AND $_POST['UserLanguage'] == $LanguageEntry){ @@ -716,7 +718,7 @@ echo '<tr> <td>' . _('Account Status') . ':</td> - <td><select name="Blocked">'; + <td><select required="required" name="Blocked">'; if ($_POST['Blocked']==0){ echo '<option selected="selected" value="0">' . _('Open') . '</option>'; echo '<option value="1">' . _('Blocked') . '</option>'; |