From 059571c6e0b7dd93f876ae2b7823547ef1cb6dae Mon Sep 17 00:00:00 2001 From: stilez Date: Thu, 29 Dec 2016 08:22:06 +0000 Subject: "Any" moved to top of list in new blank rules @jim-p wanted this split out from PR 3159 as it wasn't related to that PR. Puts "any" at the logical place people look for it (top of list not 2/3 down it at random) while ensuring that for new rules default is tcp and extra ports etc fields are visible. (cherry picked from commit e9b3d2c3bfc3e91ac59901ca28d0620f7bb7b50f) --- src/usr/local/www/firewall_rules_edit.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/usr/local/www/firewall_rules_edit.php') diff --git a/src/usr/local/www/firewall_rules_edit.php b/src/usr/local/www/firewall_rules_edit.php index 010e533..a756960 100644 --- a/src/usr/local/www/firewall_rules_edit.php +++ b/src/usr/local/www/firewall_rules_edit.php @@ -328,6 +328,7 @@ if (isset($id) && $a_filter[$id]) { $pconfig['interface'] = $_GET['if']; } $pconfig['type'] = "pass"; + $pconfig['proto'] = "tcp"; // for new blank rules, default=tcp, also ensures ports fields are visible $pconfig['src'] = "any"; $pconfig['dst'] = "any"; } @@ -1299,6 +1300,7 @@ $section->addInput(new Form_Select( 'Protocol', $pconfig['proto'], array( + 'any' => gettext('any'), 'tcp' => 'TCP', 'udp' => 'UDP', 'tcp/udp' => 'TCP/UDP', @@ -1311,7 +1313,6 @@ $section->addInput(new Form_Select( 'pim' => 'PIM', 'ospf' => 'OSPF', 'sctp' => 'SCTP', - 'any' => gettext('any'), 'carp' => 'CARP', 'pfsync' => 'PFSYNC', ) -- cgit v1.1