build: introduce luci-base
[project/luci.git] / modules / base / luasrc / luasrc / view / cbi / fvalue.htm
diff --git a/modules/base/luasrc/luasrc/view/cbi/fvalue.htm b/modules/base/luasrc/luasrc/view/cbi/fvalue.htm
new file mode 100644 (file)
index 0000000..a1e0808
--- /dev/null
@@ -0,0 +1,9 @@
+<%+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")
+       %> />
+<%+cbi/valuefooter%>