diff options
author | Renato Botelho <renato@netgate.com> | 2016-10-12 12:51:16 -0300 |
---|---|---|
committer | Renato Botelho <renato@netgate.com> | 2016-10-12 12:51:16 -0300 |
commit | d8746bc0b709dd5ddecde50318c50476b273c099 (patch) | |
tree | 01c845d82dafea7cc5bf7ab4aafe93c7623ca202 | |
parent | ceea9d9cfbe7818606b68cc09634c818e9d3a136 (diff) | |
parent | 705679339705657832422f5fdc336b5e39d48b79 (diff) | |
download | pfsense-d8746bc0b709dd5ddecde50318c50476b273c099.zip pfsense-d8746bc0b709dd5ddecde50318c50476b273c099.tar.gz |
Merge pull request #3140 from stilez/patch-39
-rw-r--r-- | src/usr/local/www/firewall_rules_edit.php | 29 |
1 files changed, 11 insertions, 18 deletions
diff --git a/src/usr/local/www/firewall_rules_edit.php b/src/usr/local/www/firewall_rules_edit.php index 330191d..512fbb8 100644 --- a/src/usr/local/www/firewall_rules_edit.php +++ b/src/usr/local/www/firewall_rules_edit.php @@ -1324,15 +1324,17 @@ foreach (['src' => 'Source', 'dst' => 'Destination'] as $type => $name) { if ($type == 'src') { $section->addInput(new Form_Button( - 'btnsrcadv', - 'Display Advanced', + 'btnsrctoggle', + '', null, 'fa-cog' - ))->setAttribute('type','button')->addClass('btn-info btn-sm'); + ))->setAttribute('type','button')->addClass('btn-info btn-sm')->setHelp( + 'The source port (or port range) is usually random and almost never equal '. + 'to the destination port range. It is not usually required, and should usually '. + 'be left at its default value, <b>any</b>).'); } $portValues = ['' => gettext('(other)'), 'any' => gettext('any')]; - foreach ($wkports as $port => $portName) { $portValues[$port] = $portName.' ('. $port .')'; } @@ -1369,16 +1371,7 @@ foreach (['src' => 'Source', 'dst' => 'Destination'] as $type => $name) { (isset($portValues[ $pconfig[$type .'endport'] ]) ? null : $pconfig[$type .'endport']) ))->setHelp('Custom'); - - if ($type == 'src') - $group->setHelp('Specify the source port or port range for this rule. This is '. - 'usually random and almost never equal to the destination port range (and '. - 'should usually be <b>any</b>). The "To" field may be left '. - 'empty if only filtering a single port.'); - else - $group->setHelp('Specify the destination port or port range for this rule. ' . - 'The "To" field may be left empty if only filtering a '. - 'single port.'); + $group->setHelp(sprintf('Specify the %s port or port range for this rule. The "To" field may be left empty if only filtering a single port.',strtolower($name))); $group->addClass(($type == 'src') ? 'srcprtr':'dstprtr'); $section->add($group); @@ -1798,7 +1791,7 @@ events.push(function() { } else { text = "<?=gettext('Display Advanced');?>"; } - $('#btnsrcadv').html('<i class="fa fa-cog"></i> ' + text); + $('#btnsrctoggle').html('<i class="fa fa-cog"></i> ' + text); } function typesel_change() { @@ -1884,7 +1877,7 @@ events.push(function() { if ($('#proto').find(":selected").index() <= 2) { hideClass('dstprtr', false); - hideInput('btnsrcadv', false); + hideInput('btnsrctoggle', false); if ((($('#srcbeginport').val() == "any") || ($('#srcbeginport').val() == "")) && (($('#srcendport').val() == "any") || ($('#srcendport').val() == ""))) { srcportsvisible = false; @@ -1893,7 +1886,7 @@ events.push(function() { } } else { hideClass('dstprtr', true); - hideInput('btnsrcadv', true); + hideInput('btnsrctoggle', true); srcportsvisible = false; } @@ -1929,7 +1922,7 @@ events.push(function() { ext_change(); }); - $('#btnsrcadv').click(function() { + $('#btnsrctoggle').click(function() { srcportsvisible = !srcportsvisible; show_source_port_range(); }); |