cleanup and remove paramSubs
This commit is contained in:
parent
2c2baef6f3
commit
67b1d3fed7
|
@ -82,10 +82,12 @@
|
||||||
<input type="submit" value="{{ getFormButtonTitle() }}" [disabled]="!form.valid">
|
<input type="submit" value="{{ getFormButtonTitle() }}" [disabled]="!form.valid">
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
|
<div *ngIf="!isCreation()">
|
||||||
<div class="account-title" i18n>Danger Zone</div>
|
<div class="account-title" i18n>Danger Zone</div>
|
||||||
|
|
||||||
<p i18n>Send a link to reset the password by mail to the user.</p>
|
<p i18n>Send a link to reset the password by mail to the user.</p>
|
||||||
<button (click)="resetPassword()" i18n>Ask for new password</button>
|
<button style="margin-top:0;" (click)="resetPassword()" i18n>Ask for new password</button>
|
||||||
|
|
||||||
<p class="mt-4" i18n>Manually set the user password</p>
|
<p class="mt-4" i18n>Manually set the user password</p>
|
||||||
<my-user-password userId="userId"></my-user-password>
|
<my-user-password userId="userId"></my-user-password>
|
||||||
|
</div>
|
|
@ -1,4 +1,4 @@
|
||||||
<form role="form" (ngSubmit)="formValidated()" [formGroup]="form">
|
<form role="form" (ngSubmit)="formValidated()" [formGroup]="form">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
|
|
||||||
<div class="input-group mb-3">
|
<div class="input-group mb-3">
|
||||||
|
@ -12,7 +12,7 @@
|
||||||
formControlName="password" [ngClass]="{ 'input-error': formErrors['password'] }"
|
formControlName="password" [ngClass]="{ 'input-error': formErrors['password'] }"
|
||||||
>
|
>
|
||||||
<div class="input-group-append">
|
<div class="input-group-append">
|
||||||
<button class="btn btn-sm btn-outline-secondary" (click)="generatePassword() "
|
<button class="btn btn-sm btn-outline-secondary" (click)="generatePassword() "
|
||||||
type="button">Generate</button>
|
type="button">Generate</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
import { Component, OnDestroy, OnInit, Input } from '@angular/core'
|
import { Component, OnDestroy, OnInit, Input } from '@angular/core'
|
||||||
import { ActivatedRoute, Router } from '@angular/router'
|
import { ActivatedRoute, Router } from '@angular/router'
|
||||||
import { Subscription } from 'rxjs'
|
|
||||||
import * as generator from 'generate-password-browser'
|
import * as generator from 'generate-password-browser'
|
||||||
import { NotificationsService } from 'angular2-notifications'
|
import { NotificationsService } from 'angular2-notifications'
|
||||||
import { UserService } from '@app/shared/users/user.service'
|
import { UserService } from '@app/shared/users/user.service'
|
||||||
|
@ -24,8 +23,6 @@ export class UserPasswordComponent extends FormReactive implements OnInit, OnDes
|
||||||
|
|
||||||
@Input() userId: number
|
@Input() userId: number
|
||||||
|
|
||||||
private paramsSub: Subscription
|
|
||||||
|
|
||||||
constructor (
|
constructor (
|
||||||
protected formValidatorService: FormValidatorService,
|
protected formValidatorService: FormValidatorService,
|
||||||
protected serverService: ServerService,
|
protected serverService: ServerService,
|
||||||
|
@ -47,7 +44,7 @@ export class UserPasswordComponent extends FormReactive implements OnInit, OnDes
|
||||||
}
|
}
|
||||||
|
|
||||||
ngOnDestroy () {
|
ngOnDestroy () {
|
||||||
this.paramsSub.unsubscribe()
|
//
|
||||||
}
|
}
|
||||||
|
|
||||||
formValidated () {
|
formValidated () {
|
||||||
|
|
Loading…
Reference in New Issue