diff options
author | Jo-Philipp Wich <jow@openwrt.org> | 2011-09-14 09:28:16 +0000 |
---|---|---|
committer | Jo-Philipp Wich <jow@openwrt.org> | 2011-09-14 09:28:16 +0000 |
commit | 537c929d636b1f147e23c2f21c56e3f8bf6f7534 (patch) | |
tree | 8ed7630c769bce0995b265a3264639cb7bb41896 /libs/web/luasrc/view | |
parent | 69406a2ac48049402f106671a316a58dc8117631 (diff) |
libs/web: track submit state in network_ifacelist widget, fixes deselecting all member ifaces in checkbox mode
Diffstat (limited to 'libs/web/luasrc/view')
-rw-r--r-- | libs/web/luasrc/view/cbi/network_ifacelist.htm | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/libs/web/luasrc/view/cbi/network_ifacelist.htm b/libs/web/luasrc/view/cbi/network_ifacelist.htm index a1b9f74513..192bcac729 100644 --- a/libs/web/luasrc/view/cbi/network_ifacelist.htm +++ b/libs/web/luasrc/view/cbi/network_ifacelist.htm @@ -3,12 +3,15 @@ <%- local utl = require "luci.util" local net = require "luci.model.network".init() + local cbeid = luci.cbi.FEXIST_PREFIX .. self.config .. "." .. section .. "." .. self.option local iface local ifaces = net:get_interfaces() - local value = self:formvalue(section) - - if not value or value == "" then + local value + + if self.map:formvalue(cbeid) == "1" then + value = self:formvalue(section) or self.default or "" + else value = self:cfgvalue(section) or self.default end @@ -29,6 +32,7 @@ end -%> +<input type="hidden" name="<%=cbeid%>" value="1" /> <ul style="margin:0; list-style-type:none"> <% for _, iface in ipairs(ifaces) do local link = iface:adminlink() |