summaryrefslogtreecommitdiffstats
path: root/src/usr
diff options
context:
space:
mode:
authorStephen Beaver <sbeaver@netgate.com>2015-12-07 11:06:38 -0500
committerStephen Beaver <sbeaver@netgate.com>2015-12-07 11:06:58 -0500
commitf75750cfda2e18ec7a64fa2918b6019894ebac6f (patch)
tree2bf4e6934e0e87947b9a10920f663f208b9b30fc /src/usr
parent3ff153307024a5531dfac5c576a3f6dc860cffe1 (diff)
downloadpfsense-f75750cfda2e18ec7a64fa2918b6019894ebac6f.zip
pfsense-f75750cfda2e18ec7a64fa2918b6019894ebac6f.tar.gz
FIxed #5597
Diffstat (limited to 'src/usr')
-rw-r--r--src/usr/local/www/firewall_nat_edit.php24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/usr/local/www/firewall_nat_edit.php b/src/usr/local/www/firewall_nat_edit.php
index 2de7d4b..0c09a59 100644
--- a/src/usr/local/www/firewall_nat_edit.php
+++ b/src/usr/local/www/firewall_nat_edit.php
@@ -706,7 +706,20 @@ $section->addInput(new Form_Select(
array_combine(explode(" ", strtolower($protocols)), explode(" ", $protocols))
))->setHelp('Choose which protocol this rule should match. In most cases "TCP" is specified.');
+$btnsrcadv = new Form_Button(
+ 'srcadv',
+ 'Advanced'
+);
+
+$btnsrcadv->removeClass('btn-primary')->addClass('btn-default');
+
+$section->addInput(new Form_StaticText(
+ 'Source',
+ $btnsrcadv
+));
+
$group = new Form_Group('Source');
+$group->addClass('srcadv');
$group->add(new Form_Checkbox(
'srcnot',
@@ -1185,6 +1198,12 @@ events.push(function(){
}
}
+ function hideSource(hide) {
+ hideClass('srcadv', hide);
+ hideClass('srcportrange', hide || !portsenabled);
+ hideInput('srcadv', !hide);
+ }
+
// ---------- "onclick" functions ---------------------------------------------------------------------------------
$('#srcbeginport').on('change', function() {
src_rep_change();
@@ -1232,14 +1251,19 @@ events.push(function(){
typesel_change();
});
+ $("#srcadv").click(function() {
+ hideSource(false);
+ });
// ---------- On initial page load --------------------------------------------------------------------------------
+ $("#srcadv").prop('type' ,'button');
ext_change();
dst_change($('#interface').val(),'<?=htmlspecialchars($pconfig['interface'])?>','<?=htmlspecialchars($pconfig['dst'])?>');
iface_old = $('#interface').val();
typesel_change();
proto_change();
nordr_change();
+ hideSource(true);
// --------- Autocomplete -----------------------------------------------------------------------------------------
var addressarray = <?= json_encode(get_alias_list(array("host", "network", "openvpn", "urltable"))) ?>;
OpenPOWER on IntegriCloud