aboutsummaryrefslogtreecommitdiffstats
path: root/src/js/views/submit.js
diff options
context:
space:
mode:
authorStruan Donald <struan@exo.org.uk>2013-09-17 17:46:13 +0100
committerStruan Donald <struan@exo.org.uk>2013-09-17 17:46:13 +0100
commitba8091c297f5074ddbd8ec7899793835b5319d8b (patch)
treee09a32c9cf949d7bac3e3646499d6eaae7ed37dc /src/js/views/submit.js
parentb5fee0ef1e6c883f3c569812cdaf0fbfb0e7fa6a (diff)
Save last show name publicly status
Stops people who never want to show their name having to click the option every time. Fixes #134
Diffstat (limited to 'src/js/views/submit.js')
-rw-r--r--src/js/views/submit.js9
1 files changed, 6 insertions, 3 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) {