From e6915e72df00a2b699d368206ee94d5d15328a50 Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Tue, 11 Sep 2012 18:35:40 +0000 Subject: applications/luci-firewall: offer zone selection in redirect quickadd (#483) --- .../luasrc/view/firewall/cbi_addforward.htm | 29 ++++++++++++++++++++-- 1 file changed, 27 insertions(+), 2 deletions(-) (limited to 'applications/luci-firewall/luasrc/view') diff --git a/applications/luci-firewall/luasrc/view/firewall/cbi_addforward.htm b/applications/luci-firewall/luasrc/view/firewall/cbi_addforward.htm index 9b17d52e7f..3726f643df 100644 --- a/applications/luci-firewall/luasrc/view/firewall/cbi_addforward.htm +++ b/applications/luci-firewall/luasrc/view/firewall/cbi_addforward.htm @@ -1,13 +1,28 @@ +<%- + local fw = require "luci.model.firewall".init() + local izl = { } + local ezl = { } + local _, z + for _, z in ipairs(fw:get_zones()) do + if z:name() ~= "wan" then + izl[#izl+1] = z + elseif z:name() ~= "lan" then + ezl[#ezl+1] = z + end + end +-%>

- +
- + + + @@ -24,9 +39,19 @@ + + -- cgit v1.2.3
<%:New port forward%>:<%:New port forward%>:
<%:Name%> <%:Protocol%><%:External zone%> <%:External port%><%:Internal zone%> <%:Internal IP address%> <%:Internal port%> + + + +