modules/admin-full, libs/web: various interface handling fixes in network settings
[project/luci.git] / libs / web / luasrc / view / cbi / network_ifacelist.htm
index 192bcac729a9869f356e607d6d4407094f5ee049..beca1599e8fac717446a33c9700f8cdec7fe4b26 100644 (file)
 <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")
                %> /> &#160;
                <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", " ")
                %> /> &#160;
                <label<%=attr("for", cbid .. "_custom")%>>
                        <img title="<%:Custom Interface%>" style="width:16px; height:16px; vertical-align:middle" src="<%=resource%>/icons/ethernet_disabled.png" />