Add an empty, normally invisible label after checkboxes and radio buttons with cbi-input-{checkbox,radio} classes to allow CSS styling them as suggested on http://www.paulund.co.uk/style-checkboxes-with-css Signed-off-by: Nils Schneider <nils@nilsschneider.net> Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
10 lines
463 B
HTML
10 lines
463 B
HTML
<%+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>
|
|
<%+cbi/valuefooter%>
|