aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/+signup/+register/register-step-user.component.ts
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/app/+signup/+register/register-step-user.component.ts')
-rw-r--r--client/src/app/+signup/+register/register-step-user.component.ts22
1 files changed, 14 insertions, 8 deletions
diff --git a/client/src/app/+signup/+register/register-step-user.component.ts b/client/src/app/+signup/+register/register-step-user.component.ts
index 3d9ab8b6b..65536568b 100644
--- a/client/src/app/+signup/+register/register-step-user.component.ts
+++ b/client/src/app/+signup/+register/register-step-user.component.ts
@@ -3,7 +3,14 @@ import { pairwise } from 'rxjs/operators'
3import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core' 3import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core'
4import { FormGroup } from '@angular/forms' 4import { FormGroup } from '@angular/forms'
5import { UserService } from '@app/core' 5import { UserService } from '@app/core'
6import { FormReactive, FormValidatorService, UserValidatorsService } from '@app/shared/shared-forms' 6import {
7 USER_DISPLAY_NAME_REQUIRED_VALIDATOR,
8 USER_EMAIL_VALIDATOR,
9 USER_PASSWORD_VALIDATOR,
10 USER_TERMS_VALIDATOR,
11 USER_USERNAME_VALIDATOR
12} from '@app/shared/form-validators/user-validators'
13import { FormReactive, FormValidatorService } from '@app/shared/shared-forms'
7 14
8@Component({ 15@Component({
9 selector: 'my-register-step-user', 16 selector: 'my-register-step-user',
@@ -19,8 +26,7 @@ export class RegisterStepUserComponent extends FormReactive implements OnInit {
19 26
20 constructor ( 27 constructor (
21 protected formValidatorService: FormValidatorService, 28 protected formValidatorService: FormValidatorService,
22 private userService: UserService, 29 private userService: UserService
23 private userValidatorsService: UserValidatorsService
24 ) { 30 ) {
25 super() 31 super()
26 } 32 }
@@ -31,11 +37,11 @@ export class RegisterStepUserComponent extends FormReactive implements OnInit {
31 37
32 ngOnInit () { 38 ngOnInit () {
33 this.buildForm({ 39 this.buildForm({
34 displayName: this.userValidatorsService.USER_DISPLAY_NAME_REQUIRED, 40 displayName: USER_DISPLAY_NAME_REQUIRED_VALIDATOR,
35 username: this.userValidatorsService.USER_USERNAME, 41 username: USER_USERNAME_VALIDATOR,
36 password: this.userValidatorsService.USER_PASSWORD, 42 password: USER_PASSWORD_VALIDATOR,
37 email: this.userValidatorsService.USER_EMAIL, 43 email: USER_EMAIL_VALIDATOR,
38 terms: this.userValidatorsService.USER_TERMS 44 terms: USER_TERMS_VALIDATOR
39 }) 45 })
40 46
41 setTimeout(() => this.formBuilt.emit(this.form)) 47 setTimeout(() => this.formBuilt.emit(this.form))