diff options
| author | Denis Ledoux <dle@openerp.com> | 2013-08-09 16:55:06 +0200 |
|---|---|---|
| committer | Denis Ledoux <dle@openerp.com> | 2013-08-09 16:55:06 +0200 |
| commit | 6c25b2df25af60ddaebf3d6eae831b7eef7e7f09 (patch) | |
| tree | ab21b1b978ee3aa79022ba9907dde74f2eb8f843 /addons/auth_oauth/static/src | |
| parent | 24546d629c66bbe4160c153ad641026a301f5038 (diff) | |
[FIX]auth_oauth: auth_oauth handle oauth error 3, auth_oauth_signup raise accessdenied instead of signuperror, auth_signup use literal_eval instead of safe_eval
bzr revid: dle@openerp.com-20130809145506-agzyvk8m1pr858jf
Diffstat (limited to 'addons/auth_oauth/static/src')
| -rw-r--r-- | addons/auth_oauth/static/src/js/auth_oauth.js | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/addons/auth_oauth/static/src/js/auth_oauth.js b/addons/auth_oauth/static/src/js/auth_oauth.js index 131ae5c1c42..5046469a5dc 100644 --- a/addons/auth_oauth/static/src/js/auth_oauth.js +++ b/addons/auth_oauth/static/src/js/auth_oauth.js @@ -1,4 +1,6 @@ openerp.auth_oauth = function(instance) { + var _t = instance.web._t, + _lt = instance.web._lt; var QWeb = instance.web.qweb; instance.web.Login.include({ @@ -9,9 +11,11 @@ openerp.auth_oauth = function(instance) { this.$el.on('click', 'a.zocial', this.on_oauth_sign_in); this.oauth_providers = []; if(this.params.oauth_error === 1) { - this.do_warn("Sign up error.","Sign up is not allowed on this database."); + this.do_warn(_t("Sign up error"),_t("Sign up is not allowed on this database."), true); } else if(this.params.oauth_error === 2) { - this.do_warn("Authentication error",""); + this.do_warn(_t("Authentication error"),_t("Access Denied"), true); + } else if(this.params.oauth_error === 3) { + this.do_warn(_t("Authentication error"),_t("You do not have access to this database or your invitation has expired. Please ask for an invitation and be sure to follow the link in your invitation email."), true); } return d.done(this.do_oauth_load).fail(function() { self.do_oauth_load([]); |
