diff options
author | Jo-Philipp Wich <jow@openwrt.org> | 2011-02-08 17:41:33 +0000 |
---|---|---|
committer | Jo-Philipp Wich <jow@openwrt.org> | 2011-02-08 17:41:33 +0000 |
commit | 2cb4a823a2ba7b889fb64227033b47cbe5abbb11 (patch) | |
tree | 0a3e7b39dca1ce14f92a5eb50725be1b759c2a5e /modules/admin-full/luasrc | |
parent | b818354c9420fe8a9bc811352c4a1f21474a2b23 (diff) |
modules/admin-full: fix checkbox default states
Diffstat (limited to 'modules/admin-full/luasrc')
-rw-r--r-- | modules/admin-full/luasrc/model/cbi/admin_network/vlan.lua | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/modules/admin-full/luasrc/model/cbi/admin_network/vlan.lua b/modules/admin-full/luasrc/model/cbi/admin_network/vlan.lua index 2ca084b46..7e9db5ea1 100644 --- a/modules/admin-full/luasrc/model/cbi/admin_network/vlan.lua +++ b/modules/admin-full/luasrc/model/cbi/admin_network/vlan.lua @@ -98,19 +98,14 @@ m.uci:foreach("network", "switch", s = m:section(NamedSection, x['.name'], "switch", translatef("Switch %q", switch_name)) s.addremove = false - s:option(Flag, "enable", translate("Enable this switch")) - .cfgvalue = function(self, section) return Flag.cfgvalue(self, section) or self.enabled end - - s:option(Flag, "enable_vlan", translate("Enable VLAN functionality")) - .cfgvalue = function(self, section) return Flag.cfgvalue(self, section) or self.enabled end + s:option(Flag, "enable", translate("Enable this switch")).default = "1" + s:option(Flag, "enable_vlan", translate("Enable VLAN functionality")).default = "1" if enable_vlan4k then s:option(Flag, "enable_vlan4k", translate("Enable 4K VLANs")) end - s:option(Flag, "reset", translate("Reset switch during setup")) - .cfgvalue = function(self, section) return Flag.cfgvalue(self, section) or self.enabled end - + s:option(Flag, "reset", translate("Reset switch during setup")).default = "1" -- VLAN table s = m:section(TypedSection, "switch_vlan", translatef("VLANs on %q", switch_name)) |