aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/+signup
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/app/+signup')
-rw-r--r--client/src/app/+signup/+verify-account/verify-account-ask-send-email/verify-account-ask-send-email.component.ts12
1 files changed, 3 insertions, 9 deletions
diff --git a/client/src/app/+signup/+verify-account/verify-account-ask-send-email/verify-account-ask-send-email.component.ts b/client/src/app/+signup/+verify-account/verify-account-ask-send-email/verify-account-ask-send-email.component.ts
index 830dd9962..afb0e6d6c 100644
--- a/client/src/app/+signup/+verify-account/verify-account-ask-send-email/verify-account-ask-send-email.component.ts
+++ b/client/src/app/+signup/+verify-account/verify-account-ask-send-email/verify-account-ask-send-email.component.ts
@@ -2,7 +2,6 @@ import { Component, OnInit } from '@angular/core'
2import { Notifier, RedirectService, ServerService, UserService } from '@app/core' 2import { Notifier, RedirectService, ServerService, UserService } from '@app/core'
3import { USER_EMAIL_VALIDATOR } from '@app/shared/form-validators/user-validators' 3import { USER_EMAIL_VALIDATOR } from '@app/shared/form-validators/user-validators'
4import { FormReactive, FormValidatorService } from '@app/shared/shared-forms' 4import { FormReactive, FormValidatorService } from '@app/shared/shared-forms'
5import { ServerConfig } from '@shared/models'
6 5
7@Component({ 6@Component({
8 selector: 'my-verify-account-ask-send-email', 7 selector: 'my-verify-account-ask-send-email',
@@ -11,7 +10,7 @@ import { ServerConfig } from '@shared/models'
11}) 10})
12 11
13export class VerifyAccountAskSendEmailComponent extends FormReactive implements OnInit { 12export class VerifyAccountAskSendEmailComponent extends FormReactive implements OnInit {
14 private serverConfig: ServerConfig 13 requiresEmailVerification = false
15 14
16 constructor ( 15 constructor (
17 protected formValidatorService: FormValidatorService, 16 protected formValidatorService: FormValidatorService,
@@ -19,18 +18,13 @@ export class VerifyAccountAskSendEmailComponent extends FormReactive implements
19 private serverService: ServerService, 18 private serverService: ServerService,
20 private notifier: Notifier, 19 private notifier: Notifier,
21 private redirectService: RedirectService 20 private redirectService: RedirectService
22 ) { 21 ) {
23 super() 22 super()
24 } 23 }
25 24
26 get requiresEmailVerification () {
27 return this.serverConfig.signup.requiresEmailVerification
28 }
29
30 ngOnInit () { 25 ngOnInit () {
31 this.serverConfig = this.serverService.getTmpConfig()
32 this.serverService.getConfig() 26 this.serverService.getConfig()
33 .subscribe(config => this.serverConfig = config) 27 .subscribe(config => this.requiresEmailVerification = config.signup.requiresEmailVerification)
34 28
35 this.buildForm({ 29 this.buildForm({
36 'verify-email-email': USER_EMAIL_VALIDATOR 30 'verify-email-email': USER_EMAIL_VALIDATOR