libs/web: improve cbi handling of Flag values, support usage of .default attribute...
[project/luci.git] / libs / web / luasrc / view / cbi / fvalue.htm
index 013c54e..df96fe2 100644 (file)
@@ -13,6 +13,9 @@ $Id$
 
 -%>
 <%+cbi/valueheader%>
 
 -%>
 <%+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")
        <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")