Changeset 274 for Dev/branches/rest-dojo-ui/client/rft/ui/LoginDialog.js
- Timestamp:
- 02/20/12 16:27:19 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Dev/branches/rest-dojo-ui/client/rft/ui/LoginDialog.js
r263 r274 6 6 templateString: template, 7 7 widgetsInTemplate: true, 8 title: "Login ",8 title: "Login/Register", 9 9 baseClass: "rftLoginDialog", 10 10 startup: function() { … … 20 20 this.loginErrors.innerHTML = ''; 21 21 var data = this.loginForm.get('value'); 22 auth.login(data. username,data.password)22 auth.login(data.email,data.password) 23 23 .then(lang.hitch(this,function() { 24 24 this.hide(); … … 29 29 event.stop(evt); 30 30 return false; 31 }, 32 onRegister: function() { 33 this.loginErrors.innerHTML = ''; 34 var data = this.loginForm.get('value'); 35 auth.register(data.email,data.password) 36 .then(lang.hitch(this,function() { 37 this.hide(); 38 content.initial(); 39 }),lang.hitch(this,function() { 40 this.loginErrors.innerHTML = 'Register failed.'; 41 })); 31 42 } 32 43 });
Note: See TracChangeset
for help on using the changeset viewer.