aboutsummaryrefslogtreecommitdiffstats
path: root/www/js/views/submit.js
diff options
context:
space:
mode:
authorStruan Donald <struan@exo.org.uk>2013-03-05 16:29:09 +0000
committerStruan Donald <struan@exo.org.uk>2013-03-05 16:29:09 +0000
commitc1d9a61bf69db7a48ba33c95cdc0b8fc00f1755c (patch)
tree76c2ee3e47d6f5437ca2af39cdadbddd5ac5f7a0 /www/js/views/submit.js
parent697dd86603ccfd8d8df823044d6cfc56c39872b8 (diff)
save personal details when we submit, load them when we start and use
them in the submit form
Diffstat (limited to 'www/js/views/submit.js')
-rw-r--r--www/js/views/submit.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/www/js/views/submit.js b/www/js/views/submit.js
index 1ce411e..e222ffe 100644
--- a/www/js/views/submit.js
+++ b/www/js/views/submit.js
@@ -27,7 +27,7 @@
}
template = _.template( tpl.get( this.template ) );
if ( this.model ) {
- this.$el.html(template({ model: this.model.toJSON(), user: FMS.currentUser }));
+ this.$el.html(template({ model: this.model.toJSON(), user: FMS.currentUser.toJSON() }));
} else {
this.$el.html(template());
}
@@ -42,6 +42,9 @@
},
onReportSync: function(model, resp, options) {
+ if ( FMS.currentUser ) {
+ FMS.currentUser.save();
+ }
this.navigate( 'sent', 'left' );
},