aboutsummaryrefslogtreecommitdiffstats
path: root/www/js
diff options
context:
space:
mode:
authorStruan Donald <struan@exo.org.uk>2013-04-26 15:31:10 +0100
committerStruan Donald <struan@exo.org.uk>2013-04-26 15:31:10 +0100
commit6471138c258b35145b3a15c7087fc3c3da58a087 (patch)
tree2c4e56f915a37181ed56f42a61b206175c85bdb3 /www/js
parent2484ff1157ef840c781585c91f01d4eef392a449 (diff)
correctly set name, etc when signing in as part of reporting
Diffstat (limited to 'www/js')
-rw-r--r--www/js/views/submit.js11
1 files changed, 7 insertions, 4 deletions
diff --git a/www/js/views/submit.js b/www/js/views/submit.js
index 5954a4b..3c0652c 100644
--- a/www/js/views/submit.js
+++ b/www/js/views/submit.js
@@ -179,8 +179,9 @@
},
beforeSubmit: function() {
- FMS.currentUser.set('name', $('#form_name').val());
- FMS.currentUser.set('phone', $('#form_phone').val());
+ 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());
}
})
});
@@ -219,8 +220,10 @@
beforeSubmit: function() {
if ( $('#form_name').val() ) {
- this.model.set('submit_clicked', '');
- FMS.currentUser.set('name', $('#form_name').val());
+ 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());
} else {
// if this is set then we are registering a password
if ( ! this.model.get('submit_clicked') ) {