diff options
author | Struan Donald <struan@exo.org.uk> | 2013-03-05 16:29:09 +0000 |
---|---|---|
committer | Struan Donald <struan@exo.org.uk> | 2013-03-05 16:29:09 +0000 |
commit | c1d9a61bf69db7a48ba33c95cdc0b8fc00f1755c (patch) | |
tree | 76c2ee3e47d6f5437ca2af39cdadbddd5ac5f7a0 /www/js/models | |
parent | 697dd86603ccfd8d8df823044d6cfc56c39872b8 (diff) |
save personal details when we submit, load them when we start and use
them in the submit form
Diffstat (limited to 'www/js/models')
-rw-r--r-- | www/js/models/report.js | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/www/js/models/report.js b/www/js/models/report.js index c9a5f0f..44d1aef 100644 --- a/www/js/models/report.js +++ b/www/js/models/report.js @@ -65,7 +65,7 @@ used_map: 1 }; - if ( FMS.currentUser ) { + if ( FMS.currentUser && FMS.currentUser.get('password') ) { params.name = FMS.currentUser.get('name'); params.email = FMS.currentUser.get('email'); params.phone = FMS.currentUser.get('phone'); @@ -83,14 +83,12 @@ params.submit_register = 1; } - /* - FMS.currentUser = new FMS.User( { + FMS.currentUser.set({ name: params.name, email: params.email, phone: params.phone, password: params.password }); - */ } var that = this; |