diff options
author | Rigel Kent <sendmemail@rigelk.eu> | 2018-12-08 15:37:36 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2019-02-11 09:26:40 +0100 |
commit | 67b1d3fed765278bdc876cce393ef56d56942df0 (patch) | |
tree | 4b893b8503ca29869c5fd7eb69e7a98dacd4d27f /client/src/app | |
parent | 2c2baef6f30625794cf1f4f72c184527a4d82562 (diff) | |
download | PeerTube-67b1d3fed765278bdc876cce393ef56d56942df0.tar.gz PeerTube-67b1d3fed765278bdc876cce393ef56d56942df0.tar.zst PeerTube-67b1d3fed765278bdc876cce393ef56d56942df0.zip |
cleanup and remove paramSubs
Diffstat (limited to 'client/src/app')
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 @@ | |||
1 | import { Component, OnDestroy, OnInit, Input } from '@angular/core' | 1 | import { Component, OnDestroy, OnInit, Input } from '@angular/core' |
2 | import { ActivatedRoute, Router } from '@angular/router' | 2 | import { ActivatedRoute, Router } from '@angular/router' |
3 | import { Subscription } from 'rxjs' | ||
4 | import * as generator from 'generate-password-browser' | 3 | import * as generator from 'generate-password-browser' |
5 | import { NotificationsService } from 'angular2-notifications' | 4 | import { NotificationsService } from 'angular2-notifications' |
6 | import { UserService } from '@app/shared/users/user.service' | 5 | import { 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 () { |