diff options
author | Chocobozzz <me@florianbigard.com> | 2018-12-05 15:10:45 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-12-05 15:10:45 +0100 |
commit | 3b3b18203fe73e499bf8b49b15369710df95993e (patch) | |
tree | 7f682442453bf126fb0acc20ada2593dcc2ae3ae /client/src/app/login/login.component.ts | |
parent | 56af5222c1ab3d6aaa76b1237bfa381ecc4878b1 (diff) | |
download | PeerTube-3b3b18203fe73e499bf8b49b15369710df95993e.tar.gz PeerTube-3b3b18203fe73e499bf8b49b15369710df95993e.tar.zst PeerTube-3b3b18203fe73e499bf8b49b15369710df95993e.zip |
Add error when email system is not configured and using the forgot
password system
Diffstat (limited to 'client/src/app/login/login.component.ts')
-rw-r--r-- | client/src/app/login/login.component.ts | 9 |
1 files changed, 4 insertions, 5 deletions
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' | |||
19 | export class LoginComponent extends FormReactive implements OnInit { | 19 | export class LoginComponent extends FormReactive implements OnInit { |
20 | @ViewChild('emailInput') input: ElementRef | 20 | @ViewChild('emailInput') input: ElementRef |
21 | @ViewChild('forgotPasswordModal') forgotPasswordModal: ElementRef | 21 | @ViewChild('forgotPasswordModal') forgotPasswordModal: ElementRef |
22 | @ViewChild('forgotPasswordEmailInput') forgotPasswordEmailInput: ElementRef | ||
23 | 22 | ||
24 | error: string = null | 23 | error: string = null |
25 | forgotPasswordEmail = '' | 24 | forgotPasswordEmail = '' |
@@ -45,6 +44,10 @@ export class LoginComponent extends FormReactive implements OnInit { | |||
45 | return this.serverService.getConfig().signup.allowed === true | 44 | return this.serverService.getConfig().signup.allowed === true |
46 | } | 45 | } |
47 | 46 | ||
47 | isEmailDisabled () { | ||
48 | return this.serverService.getConfig().email.enabled === false | ||
49 | } | ||
50 | |||
48 | ngOnInit () { | 51 | ngOnInit () { |
49 | this.buildForm({ | 52 | this.buildForm({ |
50 | username: this.loginValidatorsService.LOGIN_USERNAME, | 53 | username: this.loginValidatorsService.LOGIN_USERNAME, |
@@ -96,10 +99,6 @@ export class LoginComponent extends FormReactive implements OnInit { | |||
96 | ) | 99 | ) |
97 | } | 100 | } |
98 | 101 | ||
99 | onForgotPasswordModalShown () { | ||
100 | this.forgotPasswordEmailInput.nativeElement.focus() | ||
101 | } | ||
102 | |||
103 | openForgotPasswordModal () { | 102 | openForgotPasswordModal () { |
104 | this.openedForgotPasswordModal = this.modalService.open(this.forgotPasswordModal) | 103 | this.openedForgotPasswordModal = this.modalService.open(this.forgotPasswordModal) |
105 | } | 104 | } |