aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/+admin
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/app/+admin')
-rw-r--r--client/src/app/+admin/users/user-edit/user-edit.component.html10
-rw-r--r--client/src/app/+admin/users/user-edit/user-password.component.html4
-rw-r--r--client/src/app/+admin/users/user-edit/user-password.component.ts5
3 files changed, 9 insertions, 10 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 6944ec435..3ce246771 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
@@ -82,10 +82,12 @@
82 <input type="submit" value="{{ getFormButtonTitle() }}" [disabled]="!form.valid"> 82 <input type="submit" value="{{ getFormButtonTitle() }}" [disabled]="!form.valid">
83</form> 83</form>
84 84
85<div *ngIf="!isCreation()">
85 <div class="account-title" i18n>Danger Zone</div> 86 <div class="account-title" i18n>Danger Zone</div>
86 87
87<p i18n>Send a link to reset the password by mail to the user.</p> 88 <p i18n>Send a link to reset the password by mail to the user.</p>
88<button (click)="resetPassword()" i18n>Ask for new password</button> 89 <button style="margin-top:0;" (click)="resetPassword()" i18n>Ask for new password</button>
89 90
90<p class="mt-4" i18n>Manually set the user password</p> 91 <p class="mt-4" i18n>Manually set the user password</p>
91<my-user-password userId="userId"></my-user-password> 92 <my-user-password userId="userId"></my-user-password>
93</div> \ No newline at end of file
diff --git a/client/src/app/+admin/users/user-edit/user-password.component.html b/client/src/app/+admin/users/user-edit/user-password.component.html
index 267422bdd..822e4688e 100644
--- a/client/src/app/+admin/users/user-edit/user-password.component.html
+++ b/client/src/app/+admin/users/user-edit/user-password.component.html
@@ -1,4 +1,4 @@
1<form role="form" (ngSubmit)="formValidated()" [formGroup]="form"> 1<form role="form" (ngSubmit)="formValidated()" [formGroup]="form">
2 <div class="form-group"> 2 <div class="form-group">
3 3
4 <div class="input-group mb-3"> 4 <div class="input-group mb-3">
@@ -12,7 +12,7 @@
12 formControlName="password" [ngClass]="{ 'input-error': formErrors['password'] }" 12 formControlName="password" [ngClass]="{ 'input-error': formErrors['password'] }"
13 > 13 >
14 <div class="input-group-append"> 14 <div class="input-group-append">
15 <button class="btn btn-sm btn-outline-secondary" (click)="generatePassword() " 15 <button class="btn btn-sm btn-outline-secondary" (click)="generatePassword() "
16 type="button">Generate</button> 16 type="button">Generate</button>
17 </div> 17 </div>
18 </div> 18 </div>
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 99c4c8a59..30cd21ccd 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,6 +1,5 @@
1import { Component, OnDestroy, OnInit, Input } from '@angular/core' 1import { Component, OnDestroy, OnInit, Input } from '@angular/core'
2import { ActivatedRoute, Router } from '@angular/router' 2import { ActivatedRoute, Router } from '@angular/router'
3import { Subscription } from 'rxjs'
4import * as generator from 'generate-password-browser' 3import * as generator from 'generate-password-browser'
5import { NotificationsService } from 'angular2-notifications' 4import { NotificationsService } from 'angular2-notifications'
6import { UserService } from '@app/shared/users/user.service' 5import { UserService } from '@app/shared/users/user.service'
@@ -24,8 +23,6 @@ export class UserPasswordComponent extends FormReactive implements OnInit, OnDes
24 23
25 @Input() userId: number 24 @Input() userId: number
26 25
27 private paramsSub: Subscription
28
29 constructor ( 26 constructor (
30 protected formValidatorService: FormValidatorService, 27 protected formValidatorService: FormValidatorService,
31 protected serverService: ServerService, 28 protected serverService: ServerService,
@@ -47,7 +44,7 @@ export class UserPasswordComponent extends FormReactive implements OnInit, OnDes
47 } 44 }
48 45
49 ngOnDestroy () { 46 ngOnDestroy () {
50 this.paramsSub.unsubscribe() 47 //
51 } 48 }
52 49
53 formValidated () { 50 formValidated () {