summaryrefslogtreecommitdiffhomepage
path: root/applications
diff options
context:
space:
mode:
authorJo-Philipp Wich <jo@mein.io>2018-03-15 09:52:22 +0100
committerGitHub <noreply@github.com>2018-03-15 09:52:22 +0100
commit005f4fb7d4069d1d19506b539fd190a95eacf1e2 (patch)
tree08f7c67416fd4379c63c3f107d8dfa1e54d0e574 /applications
parentde88c2ee697fe73e406cebc55f59325003cdffcc (diff)
parent10fbf9b2e45c8b723c4c5d58a9183a55715f3d04 (diff)
Merge pull request #1654 from TDT-AG/pr/20180301-luci-several-fixes
luci-app-firewall/luci-base/luci-mod-admin-full: some fixes and improvements
Diffstat (limited to 'applications')
-rw-r--r--applications/luci-app-firewall/luasrc/view/firewall/cbi_addrule.htm7
-rw-r--r--applications/luci-app-firewall/luasrc/view/firewall/cbi_addsnat.htm5
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 58121c420..b06fac3de 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 ce275111d..0a5913fc0 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">