fix presentation of checkboxes who default to true

This commit is contained in:
Stephen Birarda 2014-09-17 08:46:08 -07:00
parent e8f5c46589
commit f1458dec3f

View file

@ -17,7 +17,7 @@
<label for="<%- setting_id %>" class="col-sm-2 control-label"><%- setting.label %></label>
<div class="col-sm-10">
<% if (setting.type === "checkbox") { %>
<% var checked_box = (values[group_key] || {})[setting_key] || setting.default %>
<% var checked_box = _.has(values, group_key) ? values[group_key][setting_key] : setting.default %>
<input type="checkbox" id="<%- setting_id %>" <%- checked_box ? "checked" : "" %>>
<% } else { %>
<% if (setting.input_addon) { %>