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>
This commit is contained in:
parent
a5b970d5f2
commit
7bb2cd6213
1 changed files with 2 additions and 3 deletions
|
@ -1,8 +1,7 @@
|
||||||
<%
|
<%
|
||||||
local fw = require "luci.model.firewall".init()
|
local fw = require "luci.model.firewall".init()
|
||||||
local nw = require "luci.model.network".init()
|
local nw = require "luci.model.network".init()
|
||||||
local wz = fw:get_zone("wan")
|
local zones = fw:get_zones()
|
||||||
local lz = fw:get_zone("lan")
|
|
||||||
|
|
||||||
local keys, vals, a, k, v = {}, {}
|
local keys, vals, a, k, v = {}, {}
|
||||||
for k, v in ipairs(nw:get_interfaces()) do
|
for k, v in ipairs(nw:get_interfaces()) do
|
||||||
|
@ -14,7 +13,7 @@
|
||||||
%>
|
%>
|
||||||
|
|
||||||
<div class="cbi-section-create cbi-tblsection-create">
|
<div class="cbi-section-create cbi-tblsection-create">
|
||||||
<% if wz and lz then %>
|
<% if #zones > 1 then %>
|
||||||
<br />
|
<br />
|
||||||
<table class="cbi-section-table" style="width:700px; margin-left:5px">
|
<table class="cbi-section-table" style="width:700px; margin-left:5px">
|
||||||
<tr class="cbi-section-table-titles">
|
<tr class="cbi-section-table-titles">
|
||||||
|
|
Loading…
Reference in a new issue