aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/reset-password
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2018-06-05 15:01:45 +0200
committerChocobozzz <me@florianbigard.com>2018-06-05 15:02:27 +0200
commite309822b93d9b69f30cbe830ef3d09dfdb2c13b2 (patch)
tree41dbc3b3108ced7fdba4062974e568695c30e486 /client/src/app/reset-password
parentd4d5853e65e584ca51c718f8df590b987f981047 (diff)
downloadPeerTube-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.ts10
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 @@
1import { Component, OnInit } from '@angular/core' 1import { Component, OnInit } from '@angular/core'
2import { ActivatedRoute, Router } from '@angular/router' 2import { ActivatedRoute, Router } from '@angular/router'
3import { USER_PASSWORD, UserService } from '@app/shared' 3import { UserService, UserValidatorsService } from '@app/shared'
4import { NotificationsService } from 'angular2-notifications' 4import { NotificationsService } from 'angular2-notifications'
5import { AuthService } from '../core' 5import { AuthService } from '../core'
6import { FormReactive } from '../shared' 6import { FormReactive } from '../shared'
7import { I18n } from '@ngx-translate/i18n-polyfill' 7import { I18n } from '@ngx-translate/i18n-polyfill'
8import { RESET_PASSWORD_CONFIRM } from '@app/shared/forms/form-validators/reset-password'
9import { FormValidatorService } from '@app/shared/forms/form-validators/form-validator.service' 8import { FormValidatorService } from '@app/shared/forms/form-validators/form-validator.service'
9import { 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']