diff options
author | Struan Donald <struan@exo.org.uk> | 2013-04-26 14:59:20 +0100 |
---|---|---|
committer | Struan Donald <struan@exo.org.uk> | 2013-04-26 15:17:48 +0100 |
commit | 5c4169e09d865b9d6658dcee56532853671bd590 (patch) | |
tree | 58b329cec2f5beb7b5a53b6cda072ff2f6d4c604 /www/js/views/submit.js | |
parent | dcc6095c50594278d035a4c29467d1de56cd33f5 (diff) |
check logged in status by using api call
Diffstat (limited to 'www/js/views/submit.js')
-rw-r--r-- | www/js/views/submit.js | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/www/js/views/submit.js b/www/js/views/submit.js index 8ab54d7..6a59923 100644 --- a/www/js/views/submit.js +++ b/www/js/views/submit.js @@ -48,6 +48,7 @@ onReportSync: function(model, resp, options) { this.stopListening(); + this.afterSubmit(); if ( FMS.currentUser ) { FMS.currentUser.save(); } @@ -67,6 +68,7 @@ }, beforeSubmit: function() {}, + afterSubmit: function() {}, _destroy: function() { this.stopListening(); @@ -228,6 +230,10 @@ } }, + afterSubmit: function() { + FMS.isLoggedIn = 1; + }, + onReportError: function(model, err, options) { if ( err.check_name ) { $('#form_name').val(err.check_name); |