summaryrefslogtreecommitdiffhomepage
path: root/applications/luci-firewall/luasrc/view
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2012-09-11 18:35:40 +0000
committerJo-Philipp Wich <jow@openwrt.org>2012-09-11 18:35:40 +0000
commite6915e72df00a2b699d368206ee94d5d15328a50 (patch)
tree6b04bcd747d4ae054e23252306b0db88952284ca /applications/luci-firewall/luasrc/view
parent8a23de32d956f17e709cff400303f9c733197846 (diff)
applications/luci-firewall: offer zone selection in redirect quickadd (#483)
Diffstat (limited to 'applications/luci-firewall/luasrc/view')
-rw-r--r--applications/luci-firewall/luasrc/view/firewall/cbi_addforward.htm29
1 files changed, 27 insertions, 2 deletions
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
+-%>
<div class="cbi-section-create cbi-tblsection-create">
<br />
- <table class="cbi-section-table" style="width:700px; margin-left:5px">
+ <table class="cbi-section-table" style="width:810px; margin-left:5px">
<tr class="cbi-section-table-titles">
- <th class="cbi-section-table-cell" colspan="6"><%:New port forward%>:</th>
+ <th class="cbi-section-table-cell" colspan="8"><%:New port forward%>:</th>
</tr>
<tr class="cbi-section-table-descr">
<th class="cbi-section-table-cell"><%:Name%></th>
<th class="cbi-section-table-cell"><%:Protocol%></th>
+ <th class="cbi-section-table-cell"><%:External zone%></th>
<th class="cbi-section-table-cell"><%:External port%></th>
+ <th class="cbi-section-table-cell"><%:Internal zone%></th>
<th class="cbi-section-table-cell"><%:Internal IP address%></th>
<th class="cbi-section-table-cell"><%:Internal port%></th>
<th class="cbi-section-table-cell"></th>
@@ -24,9 +39,19 @@
<option value="other"><%:Other...%></option>
</select>
</td>
+ <td class="cbi-section-table-cell" style="width:55px">
+ <select class="cbi-input-select" id="_newfwd.extzone" name="_newfwd.extzone">
+ <% for _, z in ipairs(ezl) do -%><option value="<%=z:name()%>"><%=z:name()%></option><%- end %>
+ </select>
+ </td>
<td class="cbi-section-table-cell" style="width:110px">
<input type="text" class="cbi-input-text" id="_newfwd.extport" name="_newfwd.extport" />
</td>
+ <td class="cbi-section-table-cell" style="width:55px">
+ <select class="cbi-input-select" id="_newfwd.intzone" name="_newfwd.intzone">
+ <% for _, z in ipairs(izl) do -%><option value="<%=z:name()%>"><%=z:name()%></option><%- end %>
+ </select>
+ </td>
<td class="cbi-section-table-cell" style="width:110px">
<input type="text" class="cbi-input-text" id="_newfwd.intaddr" name="_newfwd.intaddr" />
</td>