diff options
Diffstat (limited to 'client/src/app/+admin/users/user-edit/user-password.component.ts')
-rw-r--r-- | client/src/app/+admin/users/user-edit/user-password.component.ts | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/client/src/app/+admin/users/user-edit/user-password.component.ts b/client/src/app/+admin/users/user-edit/user-password.component.ts index 33c7de31f..25f13495a 100644 --- a/client/src/app/+admin/users/user-edit/user-password.component.ts +++ b/client/src/app/+admin/users/user-edit/user-password.component.ts | |||
@@ -1,7 +1,6 @@ | |||
1 | import { Component, Input, OnInit } from '@angular/core' | 1 | import { Component, Input, OnInit } from '@angular/core' |
2 | import { Notifier, UserService } from '@app/core' | 2 | import { Notifier, UserService } from '@app/core' |
3 | import { FormReactive, FormValidatorService, UserValidatorsService } from '@app/shared/shared-forms' | 3 | import { FormReactive, FormValidatorService, UserValidatorsService } from '@app/shared/shared-forms' |
4 | import { I18n } from '@ngx-translate/i18n-polyfill' | ||
5 | import { UserUpdate } from '@shared/models' | 4 | import { UserUpdate } from '@shared/models' |
6 | 5 | ||
7 | @Component({ | 6 | @Component({ |
@@ -20,9 +19,8 @@ export class UserPasswordComponent extends FormReactive implements OnInit { | |||
20 | protected formValidatorService: FormValidatorService, | 19 | protected formValidatorService: FormValidatorService, |
21 | private userValidatorsService: UserValidatorsService, | 20 | private userValidatorsService: UserValidatorsService, |
22 | private notifier: Notifier, | 21 | private notifier: Notifier, |
23 | private userService: UserService, | 22 | private userService: UserService |
24 | private i18n: I18n | 23 | ) { |
25 | ) { | ||
26 | super() | 24 | super() |
27 | } | 25 | } |
28 | 26 | ||
@@ -39,9 +37,7 @@ export class UserPasswordComponent extends FormReactive implements OnInit { | |||
39 | 37 | ||
40 | this.userService.updateUser(this.userId, userUpdate).subscribe( | 38 | this.userService.updateUser(this.userId, userUpdate).subscribe( |
41 | () => { | 39 | () => { |
42 | this.notifier.success( | 40 | this.notifier.success($localize`Password changed for user ${this.username}.`) |
43 | this.i18n('Password changed for user {{username}}.', { username: this.username }) | ||
44 | ) | ||
45 | }, | 41 | }, |
46 | 42 | ||
47 | err => this.error = err.message | 43 | err => this.error = err.message |
@@ -53,6 +49,6 @@ export class UserPasswordComponent extends FormReactive implements OnInit { | |||
53 | } | 49 | } |
54 | 50 | ||
55 | getFormButtonTitle () { | 51 | getFormButtonTitle () { |
56 | return this.i18n('Update user password') | 52 | return $localize`Update user password` |
57 | } | 53 | } |
58 | } | 54 | } |