diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2006-03-09 23:22:01 +0000 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2006-03-09 23:22:01 +0000 |
commit | 98f3ce92776d9832c02a4def9a18131c5c730096 (patch) | |
tree | f5c0f66ebb4dbc5cc34068a48f17b9ff0f30a603 /usr/local/www/firewall_aliases_edit.php | |
parent | 192845df63b2bbd85f984f86457be2433aed1ec1 (diff) | |
download | pfsense-98f3ce92776d9832c02a4def9a18131c5c730096.zip pfsense-98f3ce92776d9832c02a4def9a18131c5c730096.tar.gz |
Correctly turn off un-needed options such as subnet when selecting a type of "Port(s)", etc.
Ticket #864
Diffstat (limited to 'usr/local/www/firewall_aliases_edit.php')
-rwxr-xr-x | usr/local/www/firewall_aliases_edit.php | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/usr/local/www/firewall_aliases_edit.php b/usr/local/www/firewall_aliases_edit.php index 04edfc5..8b30466 100755 --- a/usr/local/www/firewall_aliases_edit.php +++ b/usr/local/www/firewall_aliases_edit.php @@ -171,16 +171,17 @@ function typesel_change() { switch (document.iform.type.selectedIndex) { case 0: /* host */ var cmd; - document.iform.address_subnet.disabled = 1; document.iform.address_subnet.value = ""; document.iform.address_subnet.selected = 0; + document.iform.address_subnet.disabled = 1; newrows = totalrows+100; - for(i=2; i<newrows; i++) { - var item = document.getElementById('document.iform.address_subnet' + i); + for(i=1; i<newrows; i++) { + var working_with = 'address_subnet' + i; + var item = document.getElementById(working_with); if(item) { - comd = 'document.iform.address_subnet' + i + '.disabled = 1;'; + comd = 'document.iform.' + working_with + '.value = "";'; eval(comd); - comd = 'document.iform.address_subnet' + i + '.value = "";'; + comd = 'document.iform.' + working_with + '.disabled = 1;'; eval(comd); } } @@ -190,7 +191,7 @@ function typesel_change() { document.iform.address_subnet.disabled = 0; newrows = totalrows+100; for(i=2; i<newrows; i++) { - var item = document.getElementById('document.iform.address_subnet' + i); + var item = document.getElementById('address_subnet' + i); if(item) { comd = 'document.iform.address_subnet' + i + '.disabled = 0;'; eval(comd); @@ -203,7 +204,7 @@ function typesel_change() { document.iform.address_subnet.value = ""; newrows = totalrows+100; for(i=2; i<newrows; i++) { - var item = document.getElementById('document.iform.address_subnet' + i); + var item = document.getElementById('address_subnet' + i); if(item) { comd = 'document.iform.address_subnet' + i + '.disabled = 1;'; eval(comd); |