summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPhil Davis <phil.davis@inf.org>2016-05-11 13:49:16 +0930
committerChris Buechler <cmb@pfsense.org>2016-05-11 01:56:31 -0500
commit3f398f0d4d5e687a91a1bad15ca8687895237f1e (patch)
treeed1b9602bd77cee616e11f97391bb39c441bcd0a
parentf212adc8f46064152cb473986c975c1b4255fbc1 (diff)
downloadpfsense-3f398f0d4d5e687a91a1bad15ca8687895237f1e.zip
pfsense-3f398f0d4d5e687a91a1bad15ca8687895237f1e.tar.gz
Hide CIDR for alias types that do not use it
Suggested/discussed in forum https://forum.pfsense.org/index.php?topic=111593.0
-rwxr-xr-xsrc/usr/local/www/firewall_aliases_edit.php4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/usr/local/www/firewall_aliases_edit.php b/src/usr/local/www/firewall_aliases_edit.php
index 90b84eb..f762fe8 100755
--- a/src/usr/local/www/firewall_aliases_edit.php
+++ b/src/usr/local/www/firewall_aliases_edit.php
@@ -774,8 +774,12 @@ events.push(function() {
disable_subnets = (tab == 'host') || (tab == 'port') || (tab == 'url') || (tab == 'url_ports');
+ // Enable/disable address_subnet so its value gets POSTed or not, as appropriate.
$("[id^='address_subnet']").prop("disabled", disable_subnets);
+ // Show or hide the slash plus address_subnet field so the user does not even see it if it is not relevant.
+ hideMask('address_subnet', disable_subnets);
+
// Set the help text to match the tab
var helparray = <?=json_encode($help);?>;
$('.helptext').html(helparray[tab]);
OpenPOWER on IntegriCloud