ifname_single.widget = "radio"
ifname_single.nobridges = true
ifname_single.network = arg[1]
-ifname_single.rmempty = true
ifname_single:depends({ type = "", proto = "static" })
ifname_single:depends({ type = "", proto = "dhcp" })
ifname_single:depends({ type = "", proto = "pppoe" })
ifname_single:depends({ type = "", proto = "none" })
function ifname_single.cfgvalue(self, s)
- return self.map.uci:get("network", s, "ifname")
+ -- let the template figure out the related ifaces through the network model
+ return nil
end
function ifname_single.write(self, s, val)
end
end
+function ifname_single.remove(self, s)
+ self:write(s, "")
+end
+
+
ifname_multi = s:taboption("physical", Value, "ifname_multi", translate("Interface"))
ifname_multi.template = "cbi/network_ifacelist"
ifname_multi.nobridges = true
ifname_multi:depends("type", "bridge")
ifname_multi.cfgvalue = ifname_single.cfgvalue
ifname_multi.write = ifname_single.write
+ifname_multi.remove = ifname_single.remove
if has_firewall then