From: <Tu...@us...> - 2012-06-10 03:44:55
|
Revision: 5435 http://web-erp.svn.sourceforge.net/web-erp/?rev=5435&view=rev Author: TurboPT Date: 2012-06-10 03:44:49 +0000 (Sun, 10 Jun 2012) Log Message: ----------- Fix a two part problem relative to a select-tag handling for work centres: 1. The error message about not having any work centres set up was not being displayed. 2. The handing for that message caused the footer to be displayed with [inside] the "New Component Details" table. Modified Paths: -------------- trunk/BOMs.php Modified: trunk/BOMs.php =================================================================== --- trunk/BOMs.php 2012-06-10 03:40:00 UTC (rev 5434) +++ trunk/BOMs.php 2012-06-10 03:44:49 UTC (rev 5435) @@ -704,19 +704,20 @@ echo '</select></td> </tr> <tr> - <td>' . _('Work Centre Added') . ': </td> - <td><select tabindex="3" name="WorkCentreAdded">'; + <td>' . _('Work Centre Added') . ': </td><td>'; $sql = "SELECT code, description FROM workcentres"; $result = DB_query($sql,$db); if (DB_num_rows($result)==0){ - prnMsg( _('There are no work centres set up yet') . '. ' . _('Please use the link below to set up work centres'),'warn'); - echo '<br /><a href="' . $rootpath . '/WorkCentres.php">' . _('Work Centre Maintenance') . '</a>'; + prnMsg( _('There are no work centres set up yet') . '. ' . _('Please use the link below to set up work centres') . '.','warn'); + echo '<a href="' . $rootpath . '/WorkCentres.php">' . _('Work Centre Maintenance') . '</a></td></tr></table><br />'; include('includes/footer.inc'); exit; } + echo '<select tabindex="3" name="WorkCentreAdded">'; + while ($myrow = DB_fetch_array($result)) { if (isset($_POST['WorkCentreAdded']) and $myrow['code']==$_POST['WorkCentreAdded']) { echo '<option selected="selected" value="'; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |