From ae36d3ccc29d67a4af7141fd7ae69f53943b09a9 Mon Sep 17 00:00:00 2001 From: "arnaud.morvan@camptocamp.com" Date: Wed, 25 Sep 2019 17:01:03 +0200 Subject: [PATCH] Clear login and password after successful login And clear password fields after failed attempts --- contribs/gmf/src/authentication/component.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/contribs/gmf/src/authentication/component.js b/contribs/gmf/src/authentication/component.js index e8fd588929a3..edddb48155e6 100644 --- a/contribs/gmf/src/authentication/component.js +++ b/contribs/gmf/src/authentication/component.js @@ -330,6 +330,7 @@ class AuthenticationController { ); }) .catch((err) => { + this.oldPwdVal = ''; this.setError_(gettextCatalog.getString('Incorrect old password.')); }); } @@ -354,9 +355,12 @@ class AuthenticationController { } else { this.gmfAuthenticationService_.login(this.loginVal, this.pwdVal) .then(() => { + this.loginVal = ''; + this.pwdVal = ''; this.resetError_(); }) .catch(() => { + this.pwdVal = ''; this.setError_(gettextCatalog.getString('Incorrect credentials or disabled account.')); }); }