From 907e3ea727744dda4942c558cc03bc75e9c40ced Mon Sep 17 00:00:00 2001 From: Phil Davis Date: Fri, 18 Mar 2016 03:30:18 +0545 Subject: Redmine #5994 Fix test for default source port fields Fixes the problem reported by @jimp where the Advanced button for the source port fields would show "Hide Advanced" when creating a new rule from scratch. Now when creating a new rule, it starts off as "Display Advanced" (with the source port fields hidden. --- src/usr/local/www/firewall_rules_edit.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/usr/local/www/firewall_rules_edit.php b/src/usr/local/www/firewall_rules_edit.php index 777c832..21e719a 100644 --- a/src/usr/local/www/firewall_rules_edit.php +++ b/src/usr/local/www/firewall_rules_edit.php @@ -1925,7 +1925,8 @@ events.push(function() { if ($('#proto').find(":selected").index() <= 2) { hideClass('dstprtr', false); hideInput('btnsrcadv', false); - if (($('#srcbeginport').val() == "any") && ($('#srcendport').val() == "any")) { + if ((($('#srcbeginport').val() == "any") || ($('#srcbeginport').val() == "")) && + (($('#srcendport').val() == "any") || ($('#srcendport').val() == ""))) { srcportsvisible = false; } else { srcportsvisible = true; -- cgit v1.1