summaryrefslogtreecommitdiffhomepage
path: root/applications/luci-app-firewall/luasrc
diff options
context:
space:
mode:
Diffstat (limited to 'applications/luci-app-firewall/luasrc')
-rw-r--r--applications/luci-app-firewall/luasrc/view/firewall/cbi_addrule.htm6
1 files changed, 2 insertions, 4 deletions
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 273675cd30..82168712ae 100644
--- a/applications/luci-app-firewall/luasrc/view/firewall/cbi_addrule.htm
+++ b/applications/luci-app-firewall/luasrc/view/firewall/cbi_addrule.htm
@@ -1,11 +1,9 @@
<%
local fw = require "luci.model.firewall".init()
- local wz = fw:get_zone("wan")
- local lz = fw:get_zone("lan")
local zones = fw:get_zones()
%>
-<% if wz then %>
+<% if #zones > 0 then %>
<h4><%:Open ports on router%></h4>
<div class="table">
<div class="tr cbi-section-table-titles">
@@ -71,7 +69,7 @@
<input type="submit" class="cbi-button cbi-button-add" name="cbi.cts.<%=self.config%>.<%=self.sectiontype%>.<%=section%>" value="<%:Add%>" />
<% end %>
-<% if wz then %>
+<% if #zones > 0 then %>
<script type="text/javascript">//<![CDATA[
cbi_validate_field('_newopen.extport', true, 'list(neg(portrange))');
cbi_bind(document.getElementById('_newopen.extport'), 'blur',