Merge pull request #3433 from birarda/master

fix presentation of checkboxes who default to true
This commit is contained in:
Stephen Birarda 2014-09-17 08:46:36 -07:00
commit 4d4c7482b3

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) { %>