diff options
author | Jo-Philipp Wich <jow@openwrt.org> | 2011-09-22 01:40:26 +0000 |
---|---|---|
committer | Jo-Philipp Wich <jow@openwrt.org> | 2011-09-22 01:40:26 +0000 |
commit | 59e95ddcadf5caac70d6f6228bf0c519297cc551 (patch) | |
tree | 6f85bcc0d243147fc21074f157c3954a8d2d78a6 /libs/web | |
parent | e2a1ffb59d689644e5fc7030838906f0ec9f30f6 (diff) |
modules/admin-full, libs/web: various interface handling fixes in network settings
Diffstat (limited to 'libs/web')
-rw-r--r-- | libs/web/luasrc/view/cbi/network_ifacelist.htm | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/libs/web/luasrc/view/cbi/network_ifacelist.htm b/libs/web/luasrc/view/cbi/network_ifacelist.htm index 192bcac72..beca1599e 100644 --- a/libs/web/luasrc/view/cbi/network_ifacelist.htm +++ b/libs/web/luasrc/view/cbi/network_ifacelist.htm @@ -36,14 +36,16 @@ <ul style="margin:0; list-style-type:none"> <% for _, iface in ipairs(ifaces) do local link = iface:adminlink() - if (not self.nobridges or not iface:is_bridge()) and iface:name() ~= self.exclude then %> + if (not self.nobridges or not iface:is_bridge()) and + (not self.noinactive or iface:is_up()) and + iface:name() ~= self.exclude + then %> <li> <input class="cbi-input-<%=self.widget or "radio"%>" onclick="cbi_d_update(this.id)" onchange="cbi_d_update(this.id)"<%= attr("type", self.widget or "radio") .. attr("id", cbid .. "." .. iface:name()) .. attr("name", cbid) .. attr("value", iface:name()) .. - ifattr(checked[iface:name()], "checked", "checked") .. - ifattr(iface:type() == "wifi" and not iface:is_up(), "disabled", "disabled") + ifattr(checked[iface:name()], "checked", "checked") %> />   <label<%=attr("for", cbid .. "." .. iface:name())%>> <% if link then -%><a href="<%=link%>"><% end -%> @@ -58,7 +60,8 @@ <input class="cbi-input-<%=self.widget or "radio"%>" onclick="cbi_d_update(this.id)" onchange="cbi_d_update(this.id)"<%= attr("type", self.widget or "radio") .. attr("id", cbid .. "_custom") .. - attr("name", cbid) + attr("name", cbid) .. + attr("value", " ") %> />   <label<%=attr("for", cbid .. "_custom")%>> <img title="<%:Custom Interface%>" style="width:16px; height:16px; vertical-align:middle" src="<%=resource%>/icons/ethernet_disabled.png" /> |