From f998cc4d4e3ac6a1b86e78b6907034179437f22c Mon Sep 17 00:00:00 2001 From: Anthony Nahas Date: Fri, 7 Sep 2018 09:27:09 +0200 Subject: [PATCH] fix(package): select the appropriate tab when forgot password action is requested #121 --- src/module/components/auth/auth.component.html | 2 +- src/module/components/auth/auth.component.ts | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/module/components/auth/auth.component.html b/src/module/components/auth/auth.component.html index fae37dd2..9c24863c 100755 --- a/src/module/components/auth/auth.component.html +++ b/src/module/components/auth/auth.component.html @@ -113,7 +113,7 @@ diff --git a/src/module/components/auth/auth.component.ts b/src/module/components/auth/auth.component.ts index a7e821d5..b2311d59 100644 --- a/src/module/components/auth/auth.component.ts +++ b/src/module/components/auth/auth.component.ts @@ -53,7 +53,7 @@ export class AuthComponent implements OnInit, OnDestroy { onError: any; authProvider = AuthProvider; - passwordResetWished: any; + passwordResetWished: boolean; public signInFormGroup: FormGroup; public signUpFormGroup: FormGroup; @@ -104,6 +104,11 @@ export class AuthComponent implements OnInit, OnDestroy { return this.authenticationError ? 'warn' : 'primary'; } + public createForgotPasswordTab() { + this.passwordResetWished = true; + setTimeout(() => this.tabIndex = 0, 100); + } + public openLegalityDialog(authProvider?: AuthProvider) { if (this.tosUrl || this.privacyPolicyUrl) { const params: LegalityDialogParams = { @@ -140,7 +145,6 @@ export class AuthComponent implements OnInit, OnDestroy { public resetPassword() { - console.log('PasswordResetEmail sent'); this.authProcess.resetPassword(this.resetPasswordEmailFormControl.value) .then(() => this.passReset = true); }