aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/reset-password/reset-password.component.ts
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/app/reset-password/reset-password.component.ts')
-rw-r--r--client/src/app/reset-password/reset-password.component.ts13
1 files changed, 6 insertions, 7 deletions
diff --git a/client/src/app/reset-password/reset-password.component.ts b/client/src/app/reset-password/reset-password.component.ts
index af1298de6..07b93ee73 100644
--- a/client/src/app/reset-password/reset-password.component.ts
+++ b/client/src/app/reset-password/reset-password.component.ts
@@ -1,8 +1,7 @@
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 { UserService, UserValidatorsService } from '@app/shared' 3import { UserService, UserValidatorsService, FormReactive } from '@app/shared'
4import { NotificationsService } from 'angular2-notifications' 4import { Notifier } from '@app/core'
5import { FormReactive } from '../shared'
6import { I18n } from '@ngx-translate/i18n-polyfill' 5import { I18n } from '@ngx-translate/i18n-polyfill'
7import { FormValidatorService } from '@app/shared/forms/form-validators/form-validator.service' 6import { FormValidatorService } from '@app/shared/forms/form-validators/form-validator.service'
8import { ResetPasswordValidatorsService } from '@app/shared/forms/form-validators/reset-password-validators.service' 7import { ResetPasswordValidatorsService } from '@app/shared/forms/form-validators/reset-password-validators.service'
@@ -22,7 +21,7 @@ export class ResetPasswordComponent extends FormReactive implements OnInit {
22 private resetPasswordValidatorsService: ResetPasswordValidatorsService, 21 private resetPasswordValidatorsService: ResetPasswordValidatorsService,
23 private userValidatorsService: UserValidatorsService, 22 private userValidatorsService: UserValidatorsService,
24 private userService: UserService, 23 private userService: UserService,
25 private notificationsService: NotificationsService, 24 private notifier: Notifier,
26 private router: Router, 25 private router: Router,
27 private route: ActivatedRoute, 26 private route: ActivatedRoute,
28 private i18n: I18n 27 private i18n: I18n
@@ -40,7 +39,7 @@ export class ResetPasswordComponent extends FormReactive implements OnInit {
40 this.verificationString = this.route.snapshot.queryParams['verificationString'] 39 this.verificationString = this.route.snapshot.queryParams['verificationString']
41 40
42 if (!this.userId || !this.verificationString) { 41 if (!this.userId || !this.verificationString) {
43 this.notificationsService.error(this.i18n('Error'), this.i18n('Unable to find user id or verification string.')) 42 this.notifier.error(this.i18n('Unable to find user id or verification string.'))
44 this.router.navigate([ '/' ]) 43 this.router.navigate([ '/' ])
45 } 44 }
46 } 45 }
@@ -49,11 +48,11 @@ export class ResetPasswordComponent extends FormReactive implements OnInit {
49 this.userService.resetPassword(this.userId, this.verificationString, this.form.value.password) 48 this.userService.resetPassword(this.userId, this.verificationString, this.form.value.password)
50 .subscribe( 49 .subscribe(
51 () => { 50 () => {
52 this.notificationsService.success(this.i18n('Success'), this.i18n('Your password has been successfully reset!')) 51 this.notifier.success(this.i18n('Your password has been successfully reset!'))
53 this.router.navigate([ '/login' ]) 52 this.router.navigate([ '/login' ])
54 }, 53 },
55 54
56 err => this.notificationsService.error('Error', err.message) 55 err => this.notifier.error(err.message)
57 ) 56 )
58 } 57 }
59 58