diff options
Diffstat (limited to 'applications')
-rw-r--r-- | applications/luci-app-firewall/luasrc/view/firewall/cbi_addrule.htm | 7 | ||||
-rw-r--r-- | applications/luci-app-firewall/luasrc/view/firewall/cbi_addsnat.htm | 5 |
2 files changed, 6 insertions, 6 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 58121c4203..b06fac3de4 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() %> <div class="cbi-section-create cbi-tblsection-create"> @@ -38,7 +39,7 @@ </tr> </table> <% end %> - <% if wz and lz then %> + <% if #zones > 1 then %> <table class="cbi-section-table" style="margin-left:5px"> <tr class="cbi-section-table-titles"> <th class="cbi-section-table-cell left" colspan="6"><br /><%:New forward rule%>:</th> @@ -56,14 +57,14 @@ <td class="cbi-section-table-cell" style="width:110px"> <select class="cbi-input-text" id="_newfwd.src" name="_newfwd.src"> <% local k, v; for k, v in ipairs(fw:get_zones()) do -%> - <option<%=ifattr(v:name() == "lan", "selected", "selected")%> value="<%=v:name()%>"><%=v:name()%></option> + <option<%=ifattr(v:name() == "wan", "selected", "selected")%> value="<%=v:name()%>"><%=v:name()%></option> <%- end %> </select> </td> <td class="cbi-section-table-cell" style="width:110px"> <select class="cbi-input-text" id="_newfwd.dest" name="_newfwd.dest"> <% local k, v; for k, v in ipairs(fw:get_zones()) do -%> - <option<%=ifattr(v:name() == "wan", "selected", "selected")%> value="<%=v:name()%>"><%=v:name()%></option> + <option<%=ifattr(v:name() == "lan", "selected", "selected")%> value="<%=v:name()%>"><%=v:name()%></option> <%- end %> </select> </td> diff --git a/applications/luci-app-firewall/luasrc/view/firewall/cbi_addsnat.htm b/applications/luci-app-firewall/luasrc/view/firewall/cbi_addsnat.htm index ce275111d8..0a5913fc00 100644 --- a/applications/luci-app-firewall/luasrc/view/firewall/cbi_addsnat.htm +++ b/applications/luci-app-firewall/luasrc/view/firewall/cbi_addsnat.htm @@ -1,8 +1,7 @@ <% local fw = require "luci.model.firewall".init() local nw = require "luci.model.network".init() - local wz = fw:get_zone("wan") - local lz = fw:get_zone("lan") + local zones = fw:get_zones() local keys, vals, a, k, v = {}, {} for k, v in ipairs(nw:get_interfaces()) do @@ -14,7 +13,7 @@ %> <div class="cbi-section-create cbi-tblsection-create"> - <% if wz and lz then %> + <% if #zones > 1 then %> <br /> <table class="cbi-section-table" style="width:700px; margin-left:5px"> <tr class="cbi-section-table-titles"> |