X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=client%2Fsrc%2Fapp%2Freset-password%2Freset-password.component.ts;h=cb4a634f13701dea6cdd635c139cb18ada5a359d;hb=bbe0f0645ca958d33a3f409b15166609733b663f;hp=58e086f4548a4f3f8c0d21574eca1d6364146810;hpb=d18d64787b3ea174f7dc2740c8c8c9555625047e;p=github%2FChocobozzz%2FPeerTube.git 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']