aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--www/js/views/submit.js11
-rw-r--r--www/templates/en/submit_password.html5
2 files changed, 12 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') ) {
diff --git a/www/templates/en/submit_password.html b/www/templates/en/submit_password.html
index 88893c8..f2e4c6c 100644
--- a/www/templates/en/submit_password.html
+++ b/www/templates/en/submit_password.html
@@ -9,6 +9,11 @@
</div>
<div id="check_name" class="nodisplay">
<input type="text" value="" id="form_name" name="name">
+ <input type="tel" value="<%= user.phone %>" name="name" id="form_phone" placeholder="Please enter your phone number">
+ <div class="checkbox-group">
+ <input type="checkbox" name="may_show_name" id="form_may_show_name" value="1" checked>
+ <label class="inline" for="form_may_show_name">Show my name publicly</label>
+ </div>
<input class="green-btn" type="button" id="report" name="report" value="Confirm name">
</div>
</div>