diff options
author | Steven Barth <steven@midlink.org> | 2008-08-07 19:03:25 +0000 |
---|---|---|
committer | Steven Barth <steven@midlink.org> | 2008-08-07 19:03:25 +0000 |
commit | e72a526984982f6fa2b6f2ed5ce01523094bfe43 (patch) | |
tree | 2f34fbbe1e21e58d9292fd13305c834cb0613b17 /modules/admin-full/luasrc/model | |
parent | d79794c1194c65861253e20681fabe103cc85740 (diff) |
libs/cbi: Added magic ;-)
Diffstat (limited to 'modules/admin-full/luasrc/model')
-rw-r--r-- | modules/admin-full/luasrc/model/cbi/admin_network/ifaces.lua | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/modules/admin-full/luasrc/model/cbi/admin_network/ifaces.lua b/modules/admin-full/luasrc/model/cbi/admin_network/ifaces.lua index 014de7ddf7..bea425d723 100644 --- a/modules/admin-full/luasrc/model/cbi/admin_network/ifaces.lua +++ b/modules/admin-full/luasrc/model/cbi/admin_network/ifaces.lua @@ -14,8 +14,14 @@ $Id$ m = Map("network", translate("interfaces"), translate("a_n_ifaces1")) s = m:section(TypedSection, "interface", "") -s.addremove = true -s:exclude("loopback") +function s.filter(section) + return section ~= "loopback" and (not arg or #arg == 0 or + luci.util.contains(arg, section)) +end + +if not arg or #arg == 0 then + s.addremove = true +end s:depends("proto", "static") s:depends("proto", "dhcp") |