summaryrefslogtreecommitdiffhomepage
path: root/modules/luci-base/luasrc/view/cbi/fvalue.htm
diff options
context:
space:
mode:
Diffstat (limited to 'modules/luci-base/luasrc/view/cbi/fvalue.htm')
-rw-r--r--modules/luci-base/luasrc/view/cbi/fvalue.htm18
1 files changed, 10 insertions, 8 deletions
diff --git a/modules/luci-base/luasrc/view/cbi/fvalue.htm b/modules/luci-base/luasrc/view/cbi/fvalue.htm
index 197d03cf31..7f975b95e1 100644
--- a/modules/luci-base/luasrc/view/cbi/fvalue.htm
+++ b/modules/luci-base/luasrc/view/cbi/fvalue.htm
@@ -1,10 +1,12 @@
<%+cbi/valueheader%>
- <input type="hidden" value="1"<%=
- attr("name", "cbi.cbe." .. self.config .. "." .. section .. "." .. self.option)
- %> />
- <input class="cbi-input-checkbox" data-update="click change" 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")
- %> />
- <label<%= attr("for", cbid)%>></label>
+<div<%=attr("data-ui-widget", luci.util.serialize_json({
+ "Checkbox", self:cfgvalue(section) or self.default, {
+ id = cbid,
+ name = cbid,
+ readonly = self.readonly,
+ hiddenname = "cbi.cbe." .. self.config .. "." .. section .. "." .. self.option,
+ value_enabled = self.enabled or 1,
+ value_disabled = self.disabled or 0
+ }
+}))%>></div>
<%+cbi/valuefooter%>