summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPhil Davis <phil.davis@inf.org>2016-03-10 11:28:26 +0545
committerPhil Davis <phil.davis@inf.org>2016-03-10 11:28:26 +0545
commit9d94bfd7b872fe65848fc71adc58ece629f1a2c7 (patch)
tree62d1a91ab3904fcf7631f3fc2ab4d1b4c82c2fdc /src
parent05e539afbad4e79143ddf499c5f827db63471d22 (diff)
downloadpfsense-9d94bfd7b872fe65848fc71adc58ece629f1a2c7.zip
pfsense-9d94bfd7b872fe65848fc71adc58ece629f1a2c7.tar.gz
Display NAT advanced source settings if defined
On NAT Port Forward Edit, if any of the source port settings are different to the defaults then display the source fields, rather than just the Advanced button. Otherwise when editing a NAT port forward with source address/port settings, it is not obvious to the user that there are existing source settings "hiding" under the Advanced button.
Diffstat (limited to 'src')
-rw-r--r--src/usr/local/www/firewall_nat_edit.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/usr/local/www/firewall_nat_edit.php b/src/usr/local/www/firewall_nat_edit.php
index 2955418..2dee79d 100644
--- a/src/usr/local/www/firewall_nat_edit.php
+++ b/src/usr/local/www/firewall_nat_edit.php
@@ -1276,7 +1276,9 @@ events.push(function() {
typesel_change();
proto_change();
nordr_change();
- hideSource(true);
+
+ var source_defined = <?= ($pconfig['srcnot'] || ($pconfig['src'] != "any") || ($pconfig['srcbeginport'] != "any") || ($pconfig['srcendport'] != "any"))? 1:0 ?>;
+ hideSource(!source_defined);
// --------- Autocomplete -----------------------------------------------------------------------------------------
var addressarray = <?= json_encode(get_alias_list(array("host", "network", "openvpn", "urltable"))) ?>;
OpenPOWER on IntegriCloud