aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--client/src/app/+admin/users/user-edit/user-edit.component.html2
-rw-r--r--client/src/app/+admin/users/user-edit/user-password.component.ts12
2 files changed, 3 insertions, 11 deletions
diff --git a/client/src/app/+admin/users/user-edit/user-edit.component.html b/client/src/app/+admin/users/user-edit/user-edit.component.html
index b06c91ff3..6944ec435 100644
--- a/client/src/app/+admin/users/user-edit/user-edit.component.html
+++ b/client/src/app/+admin/users/user-edit/user-edit.component.html
@@ -88,4 +88,4 @@
88<button (click)="resetPassword()" i18n>Ask for new password</button> 88<button (click)="resetPassword()" i18n>Ask for new password</button>
89 89
90<p class="mt-4" i18n>Manually set the user password</p> 90<p class="mt-4" i18n>Manually set the user password</p>
91<my-user-password></my-user-password> 91<my-user-password userId="userId"></my-user-password>
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 1f9ccb4e8..99c4c8a59 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
@@ -19,10 +19,11 @@ import { FormReactive } from '../../../shared'
19}) 19})
20export class UserPasswordComponent extends FormReactive implements OnInit, OnDestroy { 20export class UserPasswordComponent extends FormReactive implements OnInit, OnDestroy {
21 error: string 21 error: string
22 userId: number
23 username: string 22 username: string
24 showPassword = false 23 showPassword = false
25 24
25 @Input() userId: number
26
26 private paramsSub: Subscription 27 private paramsSub: Subscription
27 28
28 constructor ( 29 constructor (
@@ -43,15 +44,6 @@ export class UserPasswordComponent extends FormReactive implements OnInit, OnDes
43 this.buildForm({ 44 this.buildForm({
44 password: this.userValidatorsService.USER_PASSWORD 45 password: this.userValidatorsService.USER_PASSWORD
45 }) 46 })
46
47 this.paramsSub = this.route.params.subscribe(routeParams => {
48 const userId = routeParams['id']
49 this.userService.getUser(userId).subscribe(
50 user => this.onUserFetched(user),
51
52 err => this.error = err.message
53 )
54 })
55 } 47 }
56 48
57 ngOnDestroy () { 49 ngOnDestroy () {