Dont disable the type & stock so the default values (selectedIndex=0) still gets POSTED, even though the dropdowns are not displayed.

This commit is contained in:
james 2007-12-20 18:35:47 +00:00
parent a352886ca6
commit 312808bc8f

View File

@ -290,8 +290,8 @@
} }
else else
{ {
document.addreport.type.disabled=true; // document.addreport.type.disabled=true;
document.addreport.stock.disabled=true; // document.addreport.stock.disabled=true;
document.addreport.type.style.display='none'; document.addreport.type.style.display='none';
document.addreport.stock.style.display='none'; document.addreport.stock.style.display='none';
document.getElementById('reporttypecustom').style.display=''; document.getElementById('reporttypecustom').style.display='';
@ -352,7 +352,7 @@
echo "<tr><td>{$o['desc']}:</td>"; echo "<tr><td>{$o['desc']}:</td>";
echo "<td><select name=\"$ok\" id=\"$ok\">"; echo "<td><select name=\"$ok\" id=\"$ok\">";
foreach($o['values'] as $k=>$v) { foreach($o['values'] as $k=>$v) {
echo "<option value=\"$k\">$v</option>"; echo "<option value=\"$k\">$v</option>\n";
} }
echo "</select><span id=\"report{$ok}custom\" style=\"display: none;\">".i18n("Custom")."</span></td></tr>"; echo "</select><span id=\"report{$ok}custom\" style=\"display: none;\">".i18n("Custom")."</span></td></tr>";
} }