From e1dd1839931ca804970a2f9b9b4c1237160adcca Mon Sep 17 00:00:00 2001 From: Ad Schellevis Date: Thu, 4 Feb 2016 13:34:55 +0100 Subject: [PATCH] (legacy) change behaviour of associated nat rules (https://github.com/opnsense/core/issues/695), show rule but hide edit and duplicate buttons If for some reason a config has "typeless" rules, which don't belong to any active nat rule the user won't notice this anymore (and doesn't have the ability to remove them). This can happen with imports from old configs for example or manually changed configs. --- src/www/firewall_rules.php | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/src/www/firewall_rules.php b/src/www/firewall_rules.php index cad82d896..299125ab8 100644 --- a/src/www/firewall_rules.php +++ b/src/www/firewall_rules.php @@ -425,12 +425,6 @@ $( document ).ready(function() { (isset($filterent['floating']) && $selected_if == 'FloatingRules')): $interface_has_rules = true; - if (!isset($filterent['type'])) { - // not very nice.... associated NAT rules don't have a type... - // NAT rules shouldn't leak into the rules screen, breaks on edit - continue; - } - // select icon if ($filterent['type'] == "block" && empty($filterent['disabled'])) { $iconfn = "glyphicon-remove text-danger"; @@ -629,15 +623,26 @@ $( document ).ready(function() { " class="act_move btn btn-default btn-xs"> + " class="btn btn-default btn-xs"> + " data-toggle="tooltip" class="act_delete btn btn-default btn-xs"> + "> +