diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2006-07-05 01:07:08 +0000 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2006-07-05 01:07:08 +0000 |
commit | 3de8af0e40b0af367bdf7b5fda9b254bf840836b (patch) | |
tree | 18425fbe76585a46a2108cc764191f6084f9f2cb /usr | |
parent | 13c2a8122000cfef20dc35b739988d0323645b5e (diff) | |
download | pfsense-3de8af0e40b0af367bdf7b5fda9b254bf840836b.zip pfsense-3de8af0e40b0af367bdf7b5fda9b254bf840836b.tar.gz |
MFC
Hide source and destination port boxes when protocol is not tcp, udp or tcp/udp
Diffstat (limited to 'usr')
-rwxr-xr-x | usr/local/www/firewall_rules_edit.php | 6 | ||||
-rw-r--r-- | usr/local/www/javascript/firewall_rules_edit/firewall_rules_edit.js | 14 |
2 files changed, 17 insertions, 3 deletions
diff --git a/usr/local/www/firewall_rules_edit.php b/usr/local/www/firewall_rules_edit.php index 4665db1..b8da5ef 100755 --- a/usr/local/www/firewall_rules_edit.php +++ b/usr/local/www/firewall_rules_edit.php @@ -397,7 +397,7 @@ include("head.inc"); <span class="vexpl">Choose which IP protocol this rule should match. <br /> Hint: in most cases, you should specify <em>TCP</em> here.</span> </td> </tr> - <tr> + <tr id="icmpbox" name="icmpbox"> <td valign="top" class="vncell">ICMP type</td> <td class="vtable"> <select name="icmptype" class="formfld"> @@ -479,7 +479,7 @@ include("head.inc"); </div> </td> </tr> - <tr style="display:none" id="sourceportrangetable" name="sourceportrangetable"> + <tr style="display:none" id="sprtable" name="sprtable"> <td width="22%" valign="top" class="vncellreq">Source port range</td> <td width="78%" class="vtable"> <table border="0" cellspacing="0" cellpadding="0"> @@ -588,7 +588,7 @@ include("head.inc"); </td> </tr> - <tr> + <tr id="dprtr" name="dprtr"> <td width="22%" valign="top" class="vncellreq">Destination port range </td> <td width="78%" class="vtable"> <table border="0" cellspacing="0" cellpadding="0"> diff --git a/usr/local/www/javascript/firewall_rules_edit/firewall_rules_edit.js b/usr/local/www/javascript/firewall_rules_edit/firewall_rules_edit.js index cbd0fa2..de6a335 100644 --- a/usr/local/www/javascript/firewall_rules_edit/firewall_rules_edit.js +++ b/usr/local/www/javascript/firewall_rules_edit/firewall_rules_edit.js @@ -103,6 +103,20 @@ function proto_change() { } ext_change(); + + if(document.iform.proto.selectedIndex == 3 || document.iform.proto.selectedIndex == 4) { + document.getElementById("icmpbox").style.display = ''; + } else { + document.getElementById("icmpbox").style.display = 'none'; + } + + if(document.iform.proto.selectedIndex >= 0 && document.iform.proto.selectedIndex <= 3) { + document.getElementById("sprtable").style.display = ''; + document.getElementById("dprtr").style.display = ''; + } else { + document.getElementById("sprtable").style.display = 'none'; + document.getElementById("dprtr").style.display = 'none'; + } } function src_rep_change() { |