diff options
author | Florian Eckert <fe@dev.tdt.de> | 2018-01-30 11:52:32 +0100 |
---|---|---|
committer | Florian Eckert <fe@dev.tdt.de> | 2018-03-01 12:33:43 +0100 |
commit | 7bb2cd621370de9af6540cb0cfb0034905c5a737 (patch) | |
tree | 9873b13234376ad3ec0454a9489658001cc50478 /applications/luci-app-firewall/luasrc/view/firewall | |
parent | a5b970d5f2cb57e71fa0012e07146a4782d798bb (diff) |
luci-app-firewall: only show SNAT template if there are more then one zone
Only show SNAT template if there are more then one zone.
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
Diffstat (limited to 'applications/luci-app-firewall/luasrc/view/firewall')
-rw-r--r-- | applications/luci-app-firewall/luasrc/view/firewall/cbi_addsnat.htm | 5 |
1 files changed, 2 insertions, 3 deletions
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"> |