diff --git a/addons/auth_password_policy/static/src/css/password_field.css b/addons/auth_password_policy/static/src/css/password_field.css index a819c39bc03..760cba94313 100644 --- a/addons/auth_password_policy/static/src/css/password_field.css +++ b/addons/auth_password_policy/static/src/css/password_field.css @@ -14,3 +14,7 @@ meter.o_password_meter { /* also input has a 5px bottom margin... */ bottom: calc(50% - 7px + 5px) } + +input + meter.o_password_meter[length="0"] { + display: none; +} diff --git a/addons/auth_password_policy/static/src/js/password_gauge.js b/addons/auth_password_policy/static/src/js/password_gauge.js index b655463b7ed..c78843dd026 100644 --- a/addons/auth_password_policy/static/src/js/password_gauge.js +++ b/addons/auth_password_policy/static/src/js/password_gauge.js @@ -111,6 +111,7 @@ var PasswordPolicyMeter = Widget.extend({ low: 0.5, high: 0.99, max: 1, + length: 0, value: 0, optimum: 1, }, @@ -133,6 +134,7 @@ var PasswordPolicyMeter = Widget.extend({ * @param {String} password */ update: function (password) { + this.el.setAttribute('length', password.length); this.el.value = policy.computeScore(password, this._required, this._recommended); } }); diff --git a/addons/auth_signup/controllers/main.py b/addons/auth_signup/controllers/main.py index a7069fbabe0..f3afc75911d 100644 --- a/addons/auth_signup/controllers/main.py +++ b/addons/auth_signup/controllers/main.py @@ -84,7 +84,7 @@ class AuthSignupHome(Home): "Password reset attempt for <%s> by user <%s> from %s", login, request.env.user.login, request.httprequest.remote_addr) request.env['res.users'].sudo().reset_password(login) - qcontext['message'] = _("An email has been sent with credentials to reset your password") + qcontext['message'] = _("Password reset instructions sent to your email") except UserError as e: qcontext['error'] = e.args[0] except SignupError: diff --git a/addons/auth_signup/models/res_users.py b/addons/auth_signup/models/res_users.py index 8dbc67273dc..72860e96ba5 100644 --- a/addons/auth_signup/models/res_users.py +++ b/addons/auth_signup/models/res_users.py @@ -156,7 +156,7 @@ class ResUsers(models.Model): if not users: users = self.search([('email', '=', login)]) if len(users) != 1: - raise Exception(_('Reset password: invalid username or email')) + raise Exception(_('No account found for this login')) return users.action_reset_password() def action_reset_password(self): diff --git a/addons/auth_signup/views/auth_signup_login_templates.xml b/addons/auth_signup/views/auth_signup_login_templates.xml index 19273d6760b..390982beccb 100644 --- a/addons/auth_signup/views/auth_signup_login_templates.xml +++ b/addons/auth_signup/views/auth_signup_login_templates.xml @@ -65,7 +65,7 @@