diff options
author | Chocobozzz <me@florianbigard.com> | 2018-06-05 15:01:45 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-06-05 15:02:27 +0200 |
commit | e309822b93d9b69f30cbe830ef3d09dfdb2c13b2 (patch) | |
tree | 41dbc3b3108ced7fdba4062974e568695c30e486 /client/src/app/reset-password | |
parent | d4d5853e65e584ca51c718f8df590b987f981047 (diff) | |
download | PeerTube-e309822b93d9b69f30cbe830ef3d09dfdb2c13b2.tar.gz PeerTube-e309822b93d9b69f30cbe830ef3d09dfdb2c13b2.tar.zst PeerTube-e309822b93d9b69f30cbe830ef3d09dfdb2c13b2.zip |
Add form validator translations
Diffstat (limited to 'client/src/app/reset-password')
-rw-r--r-- | client/src/app/reset-password/reset-password.component.ts | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/client/src/app/reset-password/reset-password.component.ts b/client/src/app/reset-password/reset-password.component.ts index 58e086f45..cb4a634f1 100644 --- a/client/src/app/reset-password/reset-password.component.ts +++ b/client/src/app/reset-password/reset-password.component.ts | |||
@@ -1,12 +1,12 @@ | |||
1 | import { Component, OnInit } from '@angular/core' | 1 | import { Component, OnInit } from '@angular/core' |
2 | import { ActivatedRoute, Router } from '@angular/router' | 2 | import { ActivatedRoute, Router } from '@angular/router' |
3 | import { USER_PASSWORD, UserService } from '@app/shared' | 3 | import { UserService, UserValidatorsService } from '@app/shared' |
4 | import { NotificationsService } from 'angular2-notifications' | 4 | import { NotificationsService } from 'angular2-notifications' |
5 | import { AuthService } from '../core' | 5 | import { AuthService } from '../core' |
6 | import { FormReactive } from '../shared' | 6 | import { FormReactive } from '../shared' |
7 | import { I18n } from '@ngx-translate/i18n-polyfill' | 7 | import { I18n } from '@ngx-translate/i18n-polyfill' |
8 | import { RESET_PASSWORD_CONFIRM } from '@app/shared/forms/form-validators/reset-password' | ||
9 | import { FormValidatorService } from '@app/shared/forms/form-validators/form-validator.service' | 8 | import { FormValidatorService } from '@app/shared/forms/form-validators/form-validator.service' |
9 | import { ResetPasswordValidatorsService } from '@app/shared/forms/form-validators/reset-password-validators.service' | ||
10 | 10 | ||
11 | @Component({ | 11 | @Component({ |
12 | selector: 'my-login', | 12 | selector: 'my-login', |
@@ -20,6 +20,8 @@ export class ResetPasswordComponent extends FormReactive implements OnInit { | |||
20 | 20 | ||
21 | constructor ( | 21 | constructor ( |
22 | protected formValidatorService: FormValidatorService, | 22 | protected formValidatorService: FormValidatorService, |
23 | private resetPasswordValidatorsService: ResetPasswordValidatorsService, | ||
24 | private userValidatorsService: UserValidatorsService, | ||
23 | private authService: AuthService, | 25 | private authService: AuthService, |
24 | private userService: UserService, | 26 | private userService: UserService, |
25 | private notificationsService: NotificationsService, | 27 | private notificationsService: NotificationsService, |
@@ -32,8 +34,8 @@ export class ResetPasswordComponent extends FormReactive implements OnInit { | |||
32 | 34 | ||
33 | ngOnInit () { | 35 | ngOnInit () { |
34 | this.buildForm({ | 36 | this.buildForm({ |
35 | password: USER_PASSWORD, | 37 | password: this.userValidatorsService.USER_PASSWORD, |
36 | 'password-confirm': RESET_PASSWORD_CONFIRM | 38 | 'password-confirm': this.resetPasswordValidatorsService.RESET_PASSWORD_CONFIRM |
37 | }) | 39 | }) |
38 | 40 | ||
39 | this.userId = this.route.snapshot.queryParams['userId'] | 41 | this.userId = this.route.snapshot.queryParams['userId'] |