summaryrefslogtreecommitdiffstats
path: root/usr/local/www/javascript
diff options
context:
space:
mode:
authorErik Fonnesbeck <efonnes@gmail.com>2010-09-28 22:15:46 -0600
committerErik Fonnesbeck <efonnes@gmail.com>2010-09-28 22:15:46 -0600
commit96160768afdb4c9ac9d7d279360b2412a4c46469 (patch)
treeb6a0d36e8b74c92936fcab40a7f3e67910b7452a /usr/local/www/javascript
parent727b04dfb73feaacc320fe7c6757ca1bcd4a68fd (diff)
downloadpfsense-96160768afdb4c9ac9d7d279360b2412a4c46469.zip
pfsense-96160768afdb4c9ac9d7d279360b2412a4c46469.tar.gz
Simplify the logic here so that it only uses this conditional expression once.
Diffstat (limited to 'usr/local/www/javascript')
-rw-r--r--usr/local/www/javascript/firewall_nat_edit/firewall_nat_edit.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr/local/www/javascript/firewall_nat_edit/firewall_nat_edit.js b/usr/local/www/javascript/firewall_nat_edit/firewall_nat_edit.js
index 9f21c2b..0cf9884 100644
--- a/usr/local/www/javascript/firewall_nat_edit/firewall_nat_edit.js
+++ b/usr/local/www/javascript/firewall_nat_edit/firewall_nat_edit.js
@@ -112,13 +112,13 @@ function check_for_aliases() {
}
function proto_change() {
- if (document.iform.proto.selectedIndex < 3) {
+ if (document.iform.proto.selectedIndex >= 0 && document.iform.proto.selectedIndex <= 2) {
portsenabled = 1;
} else {
portsenabled = 0;
}
- if(document.iform.proto.selectedIndex >= 0 && document.iform.proto.selectedIndex <= 2) {
+ if (portsenabled) {
document.getElementById("sprtable").style.display = showsource == 1 ? '':'none';
document.getElementById("dprtr").style.display = '';
document.getElementById("lprtr").style.display = '';
OpenPOWER on IntegriCloud