diff options
author | Rigel Kent <sendmemail@rigelk.eu> | 2018-10-08 15:56:56 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2019-02-11 09:26:38 +0100 |
commit | a3342ce250936c30dc6df7563f4e984c172f61c1 (patch) | |
tree | a4b7e8c81b09563b0e3e99638d450427c1e517d2 /client/src/app | |
parent | 328c78bc4a570a9aceaaa1a2124bacd4a0e8d295 (diff) | |
download | PeerTube-a3342ce250936c30dc6df7563f4e984c172f61c1.tar.gz PeerTube-a3342ce250936c30dc6df7563f4e984c172f61c1.tar.zst PeerTube-a3342ce250936c30dc6df7563f4e984c172f61c1.zip |
remove isAdministration
Diffstat (limited to 'client/src/app')
4 files changed, 7 insertions, 17 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 cbc06c157..b06c91ff3 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,12 +82,10 @@ | |||
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="isAdministration"> | ||
86 | <div class="account-title" i18n>Danger Zone</div> | 85 | <div class="account-title" i18n>Danger Zone</div> |
87 | 86 | ||
88 | <p i18n>Send a link to reset the password by mail to the user.</p> | 87 | <p i18n>Send a link to reset the password by mail to the user.</p> |
89 | <button (click)="resetPassword()" i18n>Ask for new password</button> | 88 | <button (click)="resetPassword()" i18n>Ask for new password</button> |
90 | 89 | ||
91 | <p class="mt-4" i18n>Manually set the user password</p> | 90 | <p class="mt-4" i18n>Manually set the user password</p> |
92 | <my-user-password></my-user-password> | 91 | <my-user-password></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 ee7d8dff5..267422bdd 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 | |||
@@ -8,7 +8,7 @@ | |||
8 | </div> | 8 | </div> |
9 | </div> | 9 | </div> |
10 | <input id="passwordField" #passwordField | 10 | <input id="passwordField" #passwordField |
11 | [attr.type]="showPassword ? 'text' : 'password'" id="password" | 11 | [attr.type]="showPassword ? 'text' : 'password'" id="password" |
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"> |
@@ -22,4 +22,4 @@ | |||
22 | </div> | 22 | </div> |
23 | 23 | ||
24 | <input type="submit" value="{{ getFormButtonTitle() }}" [disabled]="!form.valid"> | 24 | <input type="submit" value="{{ getFormButtonTitle() }}" [disabled]="!form.valid"> |
25 | </form> \ No newline at end of file | 25 | </form> |
diff --git a/client/src/app/+admin/users/user-edit/user-update.component.ts b/client/src/app/+admin/users/user-edit/user-update.component.ts index cb74897d0..4e4002a73 100644 --- a/client/src/app/+admin/users/user-edit/user-update.component.ts +++ b/client/src/app/+admin/users/user-edit/user-update.component.ts | |||
@@ -21,10 +21,8 @@ export class UserUpdateComponent extends UserEdit implements OnInit, OnDestroy { | |||
21 | userId: number | 21 | userId: number |
22 | userEmail: string | 22 | userEmail: string |
23 | username: string | 23 | username: string |
24 | isAdministration = false | ||
25 | 24 | ||
26 | private paramsSub: Subscription | 25 | private paramsSub: Subscription |
27 | private isAdministrationSub: Subscription | ||
28 | 26 | ||
29 | constructor ( | 27 | constructor ( |
30 | protected formValidatorService: FormValidatorService, | 28 | protected formValidatorService: FormValidatorService, |
@@ -59,15 +57,10 @@ export class UserUpdateComponent extends UserEdit implements OnInit, OnDestroy { | |||
59 | err => this.error = err.message | 57 | err => this.error = err.message |
60 | ) | 58 | ) |
61 | }) | 59 | }) |
62 | |||
63 | this.isAdministrationSub = this.route.data.subscribe(data => { | ||
64 | if (data.isAdministration) this.isAdministration = data.isAdministration | ||
65 | }) | ||
66 | } | 60 | } |
67 | 61 | ||
68 | ngOnDestroy () { | 62 | ngOnDestroy () { |
69 | this.paramsSub.unsubscribe() | 63 | this.paramsSub.unsubscribe() |
70 | this.isAdministrationSub.unsubscribe() | ||
71 | } | 64 | } |
72 | 65 | ||
73 | formValidated () { | 66 | formValidated () { |
diff --git a/client/src/app/+admin/users/users.routes.ts b/client/src/app/+admin/users/users.routes.ts index 460ebd89e..8b3791bd3 100644 --- a/client/src/app/+admin/users/users.routes.ts +++ b/client/src/app/+admin/users/users.routes.ts | |||
@@ -44,8 +44,7 @@ export const UsersRoutes: Routes = [ | |||
44 | data: { | 44 | data: { |
45 | meta: { | 45 | meta: { |
46 | title: 'Update a user' | 46 | title: 'Update a user' |
47 | }, | 47 | } |
48 | isAdministration: true | ||
49 | } | 48 | } |
50 | } | 49 | } |
51 | ] | 50 | ] |