diff options
author | Struan Donald <struan@exo.org.uk> | 2013-08-19 17:26:15 +0100 |
---|---|---|
committer | Struan Donald <struan@exo.org.uk> | 2013-08-19 18:01:35 +0100 |
commit | 7b7b128c4633a93ed8794df5fd94c27d0d2cc431 (patch) | |
tree | d37b7dcb9cc86014e14c483f5818c679beac5206 | |
parent | d84d3ce996cf62ca78e4bc77293d7db75165a5e0 (diff) |
Reset submission type on choices screen
Removes problems with starting one type of submission, going back and
the state not being properly cleared
-rw-r--r-- | src/js/views/submit.js | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/js/views/submit.js b/src/js/views/submit.js index 705f8e6..79db28d 100644 --- a/src/js/views/submit.js +++ b/src/js/views/submit.js @@ -173,6 +173,12 @@ 'vclick #email_confirm': 'onClickConfirm' }, + afterRender: function() { + // if we are coming back to this page we want to reset how + // they are reporting + this.model.set('submit_clicked', ''); + }, + validate: function() { this.clearValidationErrors(); var isValid = 1; @@ -209,7 +215,6 @@ onClickConfirm: function(e) { e.preventDefault(); - this.model.set('submit_clicked', ''); if ( this.validate() ) { FMS.currentUser.set('email', $('#form_email').val()); this.navigate( 'submit-name' ); |