diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/js/views/submit.js | 9 | ||||
-rw-r--r-- | src/templates/en/submit_confirm.html | 2 | ||||
-rw-r--r-- | src/templates/en/submit_name.html | 2 |
3 files changed, 8 insertions, 5 deletions
diff --git a/src/js/views/submit.js b/src/js/views/submit.js index fcebd52..6cf75bb 100644 --- a/src/js/views/submit.js +++ b/src/js/views/submit.js @@ -278,8 +278,9 @@ $('p.top').show(); this.model.set('name', $('#form_name').val()); this.model.set('phone', $('#form_phone').val()); - this.model.set('may_show_name', $('#form_may_show_name').val()); + this.model.set('may_show_name', $('#form_may_show_name').is(':checked')); FMS.currentUser.set('name', $('#form_name').val()); + FMS.currentUser.set('may_show_name', $('#form_may_show_name').is(':checked')); if ( this.model.get('title_list') && this.model.get('title_list').length > 0 ) { FMS.currentUser.set('title', $('#form_title').val()); @@ -341,8 +342,9 @@ this.model.set('submit_clicked', 'submit_register'); this.model.set('phone', $('#form_phone').val()); this.model.set('name', $('#form_name').val()); - this.model.set('may_show_name', $('#form_may_show_name').val()); + this.model.set('may_show_name', $('#form_may_show_name').is(':checked')); FMS.currentUser.set('name', $('#form_name').val()); + FMS.currentUser.set('may_show_name', $('#form_may_show_name').is(':checked')); } else { // if this is set then we are registering a password if ( ! this.model.get('submit_clicked') ) { @@ -440,9 +442,10 @@ beforeSubmit: function() { this.model.set('name', $('#form_name').val()); this.model.set('phone', $('#form_phone').val()); - this.model.set('may_show_name', $('#form_may_show_name').val()); + this.model.set('may_show_name', $('#form_may_show_name').is(':checked')); this.model.set('submit_clicked', 'submit_register'); FMS.currentUser.set('name', $('#form_name').val()); + FMS.currentUser.set('may_show_name', $('#form_may_show_name').is(':checked')); }, onReportError: function(model, err, options) { diff --git a/src/templates/en/submit_confirm.html b/src/templates/en/submit_confirm.html index 1ce4b6c..01e7da8 100644 --- a/src/templates/en/submit_confirm.html +++ b/src/templates/en/submit_confirm.html @@ -21,7 +21,7 @@ <input data-role="none" type="tel" value="<%= user.phone %>" name="name" id="form_phone" placeholder="Optionally enter your phone number"> </div> <div class="checkbox-group noborder"> - <input type="checkbox" name="may_show_name" id="form_may_show_name" value="1" checked> + <input type="checkbox" name="may_show_name" id="form_may_show_name" value="1" <% if ( typeof user.may_show_name == 'undefined' || user.may_show_name ) { %>checked<% } %>> <label class="inline" for="form_may_show_name">Show my name publicly</label> </div> </div> diff --git a/src/templates/en/submit_name.html b/src/templates/en/submit_name.html index cf3f866..c193e20 100644 --- a/src/templates/en/submit_name.html +++ b/src/templates/en/submit_name.html @@ -27,7 +27,7 @@ </div> <div data-role="fieldcontain"> <fieldset data-role="controlgroup"> - <input type="checkbox" name="may_show_name" id="form_may_show_name" value="1" checked> + <input type="checkbox" name="may_show_name" id="form_may_show_name" value="1" <% if ( typeof user.may_show_name == 'undefined' || user.may_show_name ) { %>checked<% } %>> <label for="form_may_show_name">Show my name publicly</label> </fieldset> </div> |