diff options
author | Jo-Philipp Wich <jow@openwrt.org> | 2011-01-29 17:54:00 +0000 |
---|---|---|
committer | Jo-Philipp Wich <jow@openwrt.org> | 2011-01-29 17:54:00 +0000 |
commit | be5b1015b2a3d87384ece96eba7d3c2a4a217fd4 (patch) | |
tree | 227681babdd06cccf5036f531cf85391d97c92e5 /libs/web/luasrc/view | |
parent | ece62bd9abc158ab6b26a7e19ef89af789dff87d (diff) |
libs/web: improve cbi handling of Flag values, support usage of .default attribute to signalize default-on checkboxes, this helps to deal with the reversed logic of various uci bools within OpenWrt configs
Diffstat (limited to 'libs/web/luasrc/view')
-rw-r--r-- | libs/web/luasrc/view/cbi/fvalue.htm | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/libs/web/luasrc/view/cbi/fvalue.htm b/libs/web/luasrc/view/cbi/fvalue.htm index 013c54e68..df96fe2c6 100644 --- a/libs/web/luasrc/view/cbi/fvalue.htm +++ b/libs/web/luasrc/view/cbi/fvalue.htm @@ -13,6 +13,9 @@ $Id$ -%> <%+cbi/valueheader%> + <input type="hidden" value="1"<%= + attr("name", "cbi.cbe." .. self.config .. "." .. section .. "." .. self.option) + %> /> <input class="cbi-input-checkbox" onclick="cbi_d_update(this.id)" onchange="cbi_d_update(this.id)" type="checkbox"<%= attr("id", cbid) .. attr("name", cbid) .. attr("value", self.enabled or 1) .. ifattr((self:cfgvalue(section) or self.default) == self.enabled, "checked", "checked") |