diff options
| author | Raphael Collet <rco@openerp.com> | 2012-09-26 11:53:53 +0200 |
|---|---|---|
| committer | Raphael Collet <rco@openerp.com> | 2012-09-26 11:53:53 +0200 |
| commit | a50dfa668d9de6fe8e054deb24366d99b21e3d96 (patch) | |
| tree | e0de370997e2483d4c2b054338b362142d2a9880 /addons | |
| parent | 9906a2bda10ca089fff55521f3252f4f8b178344 (diff) | |
[IMP] auth_signup: improve error message handling with method show_error()
bzr revid: rco@openerp.com-20120926095353-7cgcby7biohfx0i2
Diffstat (limited to 'addons')
| -rw-r--r-- | addons/auth_signup/static/src/js/auth_signup.js | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/addons/auth_signup/static/src/js/auth_signup.js b/addons/auth_signup/static/src/js/auth_signup.js index 9c90358d9e3..282221bc87e 100644 --- a/addons/auth_signup/static/src/js/auth_signup.js +++ b/addons/auth_signup/static/src/js/auth_signup.js @@ -11,14 +11,10 @@ openerp.auth_signup = function(instance) { self.on_change_mode() self.$("form input[name=signup]").click(self.on_change_mode); - // if there is an error message, show it then forget it + // if there is an error message in params, show it then forget it if (self.params.error_message) { - this.$el.addClass('oe_login_invalid'); - this.$(".oe_login_error_message").text(self.params.error_message); + this.show_error(self.params.error_message); delete self.params.error_message; - } else { - this.$el.removeClass('oe_login_invalid'); - this.$(".oe_login_error_message").text("Invalid username or password"); } // in case of a signup, retrieve the user information from the token @@ -44,8 +40,7 @@ openerp.auth_signup = function(instance) { if (ev) { ev.preventDefault(); } - this.$el.addClass('oe_login_invalid'); - this.$(".oe_login_error_message").text("Invalid signup token"); + this.show_error("Invalid signup token"); delete this.params.db; delete this.params.token; }, |
