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.ts17
1 files changed, 1 insertions, 16 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 9193540b4..716cd8c78 100644
--- a/client/src/app/+signup/+register/register-step-user.component.ts
+++ b/client/src/app/+signup/+register/register-step-user.component.ts
@@ -7,7 +7,6 @@ import {
7 USER_DISPLAY_NAME_REQUIRED_VALIDATOR, 7 USER_DISPLAY_NAME_REQUIRED_VALIDATOR,
8 USER_EMAIL_VALIDATOR, 8 USER_EMAIL_VALIDATOR,
9 USER_PASSWORD_VALIDATOR, 9 USER_PASSWORD_VALIDATOR,
10 USER_TERMS_VALIDATOR,
11 USER_USERNAME_VALIDATOR 10 USER_USERNAME_VALIDATOR
12} from '@app/shared/form-validators/user-validators' 11} from '@app/shared/form-validators/user-validators'
13import { FormReactive, FormValidatorService } from '@app/shared/shared-forms' 12import { FormReactive, FormValidatorService } from '@app/shared/shared-forms'
@@ -18,12 +17,9 @@ import { FormReactive, FormValidatorService } from '@app/shared/shared-forms'
18 styleUrls: [ './register.component.scss' ] 17 styleUrls: [ './register.component.scss' ]
19}) 18})
20export class RegisterStepUserComponent extends FormReactive implements OnInit { 19export class RegisterStepUserComponent extends FormReactive implements OnInit {
21 @Input() hasCodeOfConduct = false
22 @Input() videoUploadDisabled = false 20 @Input() videoUploadDisabled = false
23 21
24 @Output() formBuilt = new EventEmitter<FormGroup>() 22 @Output() formBuilt = new EventEmitter<FormGroup>()
25 @Output() termsClick = new EventEmitter<void>()
26 @Output() codeOfConductClick = new EventEmitter<void>()
27 23
28 constructor ( 24 constructor (
29 protected formValidatorService: FormValidatorService, 25 protected formValidatorService: FormValidatorService,
@@ -41,8 +37,7 @@ export class RegisterStepUserComponent extends FormReactive implements OnInit {
41 displayName: USER_DISPLAY_NAME_REQUIRED_VALIDATOR, 37 displayName: USER_DISPLAY_NAME_REQUIRED_VALIDATOR,
42 username: USER_USERNAME_VALIDATOR, 38 username: USER_USERNAME_VALIDATOR,
43 password: USER_PASSWORD_VALIDATOR, 39 password: USER_PASSWORD_VALIDATOR,
44 email: USER_EMAIL_VALIDATOR, 40 email: USER_EMAIL_VALIDATOR
45 terms: USER_TERMS_VALIDATOR
46 }) 41 })
47 42
48 setTimeout(() => this.formBuilt.emit(this.form)) 43 setTimeout(() => this.formBuilt.emit(this.form))
@@ -54,16 +49,6 @@ export class RegisterStepUserComponent extends FormReactive implements OnInit {
54 .subscribe(([ oldValue, newValue ]) => this.onDisplayNameChange(oldValue, newValue)) 49 .subscribe(([ oldValue, newValue ]) => this.onDisplayNameChange(oldValue, newValue))
55 } 50 }
56 51
57 onTermsClick (event: Event) {
58 event.preventDefault()
59 this.termsClick.emit()
60 }
61
62 onCodeOfConductClick (event: Event) {
63 event.preventDefault()
64 this.codeOfConductClick.emit()
65 }
66
67 private onDisplayNameChange (oldDisplayName: string, newDisplayName: string) { 52 private onDisplayNameChange (oldDisplayName: string, newDisplayName: string) {
68 const username = this.form.value['username'] || '' 53 const username = this.form.value['username'] || ''
69 54