From e309822b93d9b69f30cbe830ef3d09dfdb2c13b2 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Tue, 5 Jun 2018 15:01:45 +0200 Subject: Add form validator translations --- client/src/app/reset-password/reset-password.component.ts | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'client/src/app/reset-password/reset-password.component.ts') 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 @@ import { Component, OnInit } from '@angular/core' import { ActivatedRoute, Router } from '@angular/router' -import { USER_PASSWORD, UserService } from '@app/shared' +import { UserService, UserValidatorsService } from '@app/shared' import { NotificationsService } from 'angular2-notifications' import { AuthService } from '../core' import { FormReactive } from '../shared' import { I18n } from '@ngx-translate/i18n-polyfill' -import { RESET_PASSWORD_CONFIRM } from '@app/shared/forms/form-validators/reset-password' import { FormValidatorService } from '@app/shared/forms/form-validators/form-validator.service' +import { ResetPasswordValidatorsService } from '@app/shared/forms/form-validators/reset-password-validators.service' @Component({ selector: 'my-login', @@ -20,6 +20,8 @@ export class ResetPasswordComponent extends FormReactive implements OnInit { constructor ( protected formValidatorService: FormValidatorService, + private resetPasswordValidatorsService: ResetPasswordValidatorsService, + private userValidatorsService: UserValidatorsService, private authService: AuthService, private userService: UserService, private notificationsService: NotificationsService, @@ -32,8 +34,8 @@ export class ResetPasswordComponent extends FormReactive implements OnInit { ngOnInit () { this.buildForm({ - password: USER_PASSWORD, - 'password-confirm': RESET_PASSWORD_CONFIRM + password: this.userValidatorsService.USER_PASSWORD, + 'password-confirm': this.resetPasswordValidatorsService.RESET_PASSWORD_CONFIRM }) this.userId = this.route.snapshot.queryParams['userId'] -- cgit v1.2.3