From c1d9a61bf69db7a48ba33c95cdc0b8fc00f1755c Mon Sep 17 00:00:00 2001 From: Struan Donald Date: Tue, 5 Mar 2013 16:29:09 +0000 Subject: save personal details when we submit, load them when we start and use them in the submit form --- www/js/models/report.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'www/js/models/report.js') 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; -- cgit v1.2.3