summaryrefslogtreecommitdiffhomepage
path: root/libs
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2009-11-01 19:49:07 +0000
committerJo-Philipp Wich <jow@openwrt.org>2009-11-01 19:49:07 +0000
commita60f781bdf6ff4b4d117fd1dfe54c8a664c5bfaf (patch)
treec831736142f5764f7f71a6b3c510bb7a18e0a190 /libs
parent76597985edea575860d01533a56954ebdc11307e (diff)
libs/cbi: fix formatting issue in zone picker widget
Diffstat (limited to 'libs')
-rw-r--r--libs/cbi/luasrc/view/cbi/firewall_zonelist.htm9
1 files changed, 6 insertions, 3 deletions
diff --git a/libs/cbi/luasrc/view/cbi/firewall_zonelist.htm b/libs/cbi/luasrc/view/cbi/firewall_zonelist.htm
index 863452fbb..052378664 100644
--- a/libs/cbi/luasrc/view/cbi/firewall_zonelist.htm
+++ b/libs/cbi/luasrc/view/cbi/firewall_zonelist.htm
@@ -48,10 +48,12 @@ $Id$
<label<%=attr("for", cbid .. "." .. zone:name())%> style="background-color:<%=zone:get_color()%>; padding:0.5em">
<strong><%=zone:name()%>:</strong>
<%
- local empty = true
+ local zempty = true
for _, net in ipairs(zone:get_networks()) do
net = nwm:get_network(net)
+ zempty = false
if net then
+ local nempty = true
%>
&nbsp;
<%- if net:name() == self.network then -%>
@@ -62,13 +64,14 @@ $Id$
<%
for _, iface in ipairs(net and net:get_interfaces() or {}) do
if not iface:is_bridgeport() then
- empty = false
+ nempty = false
%>
<img<%=attr("title", iface:get_i18n())%> style="width:16px; height:16px; vertical-align:middle" src="<%=resource%>/icons/<%=iface:type()%><%=iface:is_up() and "" or "_disabled"%>.png" />
<% end end %>
+ <% if nempty then %><em><%:(no interfaces attached)%></em><% end %>
</span>
<% end end %>
- <% if empty then %><em><%:(no interfaces attached)%></em><% end %>
+ <% if zempty then %><em><%:(no interfaces attached)%></em><% end %>
</label>
</li>
<% end end %>