From 3b3b18203fe73e499bf8b49b15369710df95993e Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Wed, 5 Dec 2018 15:10:45 +0100 Subject: Add error when email system is not configured and using the forgot password system --- client/src/app/login/login.component.ts | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'client/src/app/login/login.component.ts') diff --git a/client/src/app/login/login.component.ts b/client/src/app/login/login.component.ts index 7553e6456..212a8ff1f 100644 --- a/client/src/app/login/login.component.ts +++ b/client/src/app/login/login.component.ts @@ -19,7 +19,6 @@ import { Router } from '@angular/router' export class LoginComponent extends FormReactive implements OnInit { @ViewChild('emailInput') input: ElementRef @ViewChild('forgotPasswordModal') forgotPasswordModal: ElementRef - @ViewChild('forgotPasswordEmailInput') forgotPasswordEmailInput: ElementRef error: string = null forgotPasswordEmail = '' @@ -45,6 +44,10 @@ export class LoginComponent extends FormReactive implements OnInit { return this.serverService.getConfig().signup.allowed === true } + isEmailDisabled () { + return this.serverService.getConfig().email.enabled === false + } + ngOnInit () { this.buildForm({ username: this.loginValidatorsService.LOGIN_USERNAME, @@ -96,10 +99,6 @@ export class LoginComponent extends FormReactive implements OnInit { ) } - onForgotPasswordModalShown () { - this.forgotPasswordEmailInput.nativeElement.focus() - } - openForgotPasswordModal () { this.openedForgotPasswordModal = this.modalService.open(this.forgotPasswordModal) } -- cgit v1.2.3