cleanup and remove paramSubs

This commit is contained in:
Rigel Kent 2018-12-08 15:37:36 +01:00 committed by Chocobozzz
parent 2c2baef6f3
commit 67b1d3fed7
No known key found for this signature in database
GPG Key ID: 583A612D890159BE
3 changed files with 9 additions and 10 deletions

View File

@ -82,10 +82,12 @@
<input type="submit" value="{{ getFormButtonTitle() }}" [disabled]="!form.valid">
</form>
<div *ngIf="!isCreation()">
<div class="account-title" i18n>Danger Zone</div>
<p i18n>Send a link to reset the password by mail to the user.</p>
<button (click)="resetPassword()" i18n>Ask for new password</button>
<p i18n>Send a link to reset the password by mail to the user.</p>
<button style="margin-top:0;" (click)="resetPassword()" i18n>Ask for new password</button>
<p class="mt-4" i18n>Manually set the user password</p>
<my-user-password userId="userId"></my-user-password>
<p class="mt-4" i18n>Manually set the user password</p>
<my-user-password userId="userId"></my-user-password>
</div>

View File

@ -1,6 +1,5 @@
import { Component, OnDestroy, OnInit, Input } from '@angular/core'
import { ActivatedRoute, Router } from '@angular/router'
import { Subscription } from 'rxjs'
import * as generator from 'generate-password-browser'
import { NotificationsService } from 'angular2-notifications'
import { UserService } from '@app/shared/users/user.service'
@ -24,8 +23,6 @@ export class UserPasswordComponent extends FormReactive implements OnInit, OnDes
@Input() userId: number
private paramsSub: Subscription
constructor (
protected formValidatorService: FormValidatorService,
protected serverService: ServerService,
@ -47,7 +44,7 @@ export class UserPasswordComponent extends FormReactive implements OnInit, OnDes
}
ngOnDestroy () {
this.paramsSub.unsubscribe()
//
}
formValidated () {