libs/cbi: various widget fixes
[project/luci.git] / libs / cbi / luasrc / view / cbi / fvalue.htm
index b46817c..35ebac6 100644 (file)
@@ -13,5 +13,5 @@ $Id$
 
 -%>
 <%+cbi/valueheader%>
-       <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) .. ifattr(self:cfgvalue(section) == self.enabled, "checked", "checked") %> value="1" />
+       <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) .. ifattr((self:cfgvalue(section) or self.default) == self.enabled, "checked", "checked") %> value="1" />
 <%+cbi/valuefooter%>