From 846fb1f8bc7e779d22d399fa4ac4cb9f73964007 Mon Sep 17 00:00:00 2001 From: Florian Eckert Date: Thu, 8 Feb 2018 13:07:24 +0100 Subject: [PATCH] luci-app-firewall: only show portforward template if there are more then one zone Only show portforward template if there are more then one zone. Signed-off-by: Florian Eckert --- .../luci-app-firewall/luasrc/view/firewall/cbi_addrule.htm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/applications/luci-app-firewall/luasrc/view/firewall/cbi_addrule.htm b/applications/luci-app-firewall/luasrc/view/firewall/cbi_addrule.htm index 58121c420..e1fef02d9 100644 --- a/applications/luci-app-firewall/luasrc/view/firewall/cbi_addrule.htm +++ b/applications/luci-app-firewall/luasrc/view/firewall/cbi_addrule.htm @@ -2,6 +2,7 @@ local fw = require "luci.model.firewall".init() local wz = fw:get_zone("wan") local lz = fw:get_zone("lan") + local zones = fw:get_zones() %>
@@ -38,7 +39,7 @@ <% end %> - <% if wz and lz then %> + <% if #zones > 1 then %> -- 2.25.1

<%:New forward rule%>: