summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorstilez <stilez@users.noreply.github.com>2016-09-16 19:57:25 +0100
committerRenato Botelho <renato@netgate.com>2016-10-12 12:51:21 -0300
commit9a211d3a3c46ded1dc37714f5e6791270aaa0c7b (patch)
tree7a6899e720b440e7d8a2d34cdecabf813017488a /src
parentc58cdd427214c51c052bdadc7cf256d3bce4c46b (diff)
downloadpfsense-9a211d3a3c46ded1dc37714f5e6791270aaa0c7b.zip
pfsense-9a211d3a3c46ded1dc37714f5e6791270aaa0c7b.tar.gz
UI improvement - src port button label and src port help msgs
1. Rename "srcportadv" to "srcporttoggle" - not ideal to have 2 fields both labelled "advanced options". This presentation probably works nicer 2. Self-explanatory show/hide button itself doesn't need a label. (If srcports are shown, they will have a label as usual) 2. Move explanatory text about src port normally being un-needed to below src port, and simplify main help msgs. Mainly GUI text/labels improvement (cherry picked from commit d99ceeac154627d2cfce94b51f1fd7d56fa44f9b)
Diffstat (limited to 'src')
-rw-r--r--src/usr/local/www/firewall_rules_edit.php30
1 files changed, 12 insertions, 18 deletions
diff --git a/src/usr/local/www/firewall_rules_edit.php b/src/usr/local/www/firewall_rules_edit.php
index bfc916d..fc41f68 100644
--- a/src/usr/local/www/firewall_rules_edit.php
+++ b/src/usr/local/www/firewall_rules_edit.php
@@ -1361,15 +1361,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 .')';
}
@@ -1406,16 +1408,8 @@ 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('Specify the destination port or port range for this rule. ' .
+ 'The "To" field may be left empty if only filtering a single port.');
$group->addClass(($type == 'src') ? 'srcprtr':'dstprtr');
$section->add($group);
@@ -1835,7 +1829,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() {
@@ -1921,7 +1915,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;
@@ -1930,7 +1924,7 @@ events.push(function() {
}
} else {
hideClass('dstprtr', true);
- hideInput('btnsrcadv', true);
+ hideInput('btnsrctoggle', true);
srcportsvisible = false;
}
@@ -1966,7 +1960,7 @@ events.push(function() {
ext_change();
});
- $('#btnsrcadv').click(function() {
+ $('#btnsrctoggle').click(function() {
srcportsvisible = !srcportsvisible;
show_source_port_range();
});
OpenPOWER on IntegriCloud