diff options
Diffstat (limited to 'client/src/app/shared/moderation')
3 files changed, 11 insertions, 6 deletions
diff --git a/client/src/app/shared/moderation/user-ban-modal.component.html b/client/src/app/shared/moderation/user-ban-modal.component.html index f38ea543d..365eb1938 100644 --- a/client/src/app/shared/moderation/user-ban-modal.component.html +++ b/client/src/app/shared/moderation/user-ban-modal.component.html | |||
@@ -8,8 +8,10 @@ | |||
8 | <div class="modal-body"> | 8 | <div class="modal-body"> |
9 | <form novalidate [formGroup]="form" (ngSubmit)="banUser()"> | 9 | <form novalidate [formGroup]="form" (ngSubmit)="banUser()"> |
10 | <div class="form-group"> | 10 | <div class="form-group"> |
11 | <textarea i18n-placeholder placeholder="Reason..." formControlName="reason" [ngClass]="{ 'input-error': formErrors['reason'] }"> | 11 | <textarea |
12 | </textarea> | 12 | i18n-placeholder placeholder="Reason..." formControlName="reason" |
13 | class="form-control" [ngClass]="{ 'input-error': formErrors['reason'] }" | ||
14 | ></textarea> | ||
13 | <div *ngIf="formErrors.reason" class="form-error"> | 15 | <div *ngIf="formErrors.reason" class="form-error"> |
14 | {{ formErrors.reason }} | 16 | {{ formErrors.reason }} |
15 | </div> | 17 | </div> |
@@ -20,7 +22,10 @@ | |||
20 | </div> | 22 | </div> |
21 | 23 | ||
22 | <div class="form-group inputs"> | 24 | <div class="form-group inputs"> |
23 | <span i18n class="action-button action-button-cancel" (click)="hide()">Cancel</span> | 25 | <input |
26 | type="button" role="button" i18n-value value="Cancel" class="action-button action-button-cancel" | ||
27 | (click)="hide()" (key.enter)="hide()" | ||
28 | > | ||
24 | 29 | ||
25 | <input | 30 | <input |
26 | type="submit" i18n-value value="Ban this user" class="action-button-submit" | 31 | type="submit" i18n-value value="Ban this user" class="action-button-submit" |
diff --git a/client/src/app/shared/moderation/user-ban-modal.component.ts b/client/src/app/shared/moderation/user-ban-modal.component.ts index cf0e1577a..1647e3691 100644 --- a/client/src/app/shared/moderation/user-ban-modal.component.ts +++ b/client/src/app/shared/moderation/user-ban-modal.component.ts | |||
@@ -39,7 +39,7 @@ export class UserBanModalComponent extends FormReactive implements OnInit { | |||
39 | 39 | ||
40 | openModal (user: User | User[]) { | 40 | openModal (user: User | User[]) { |
41 | this.usersToBan = user | 41 | this.usersToBan = user |
42 | this.openedModal = this.modalService.open(this.modal) | 42 | this.openedModal = this.modalService.open(this.modal, { centered: true }) |
43 | } | 43 | } |
44 | 44 | ||
45 | hide () { | 45 | hide () { |
diff --git a/client/src/app/shared/moderation/user-moderation-dropdown.component.ts b/client/src/app/shared/moderation/user-moderation-dropdown.component.ts index 11d8588f4..c8ccaa800 100644 --- a/client/src/app/shared/moderation/user-moderation-dropdown.component.ts +++ b/client/src/app/shared/moderation/user-moderation-dropdown.component.ts | |||
@@ -14,13 +14,13 @@ import { ServerConfig } from '@shared/models' | |||
14 | templateUrl: './user-moderation-dropdown.component.html' | 14 | templateUrl: './user-moderation-dropdown.component.html' |
15 | }) | 15 | }) |
16 | export class UserModerationDropdownComponent implements OnInit, OnChanges { | 16 | export class UserModerationDropdownComponent implements OnInit, OnChanges { |
17 | @ViewChild('userBanModal', { static: false }) userBanModal: UserBanModalComponent | 17 | @ViewChild('userBanModal') userBanModal: UserBanModalComponent |
18 | 18 | ||
19 | @Input() user: User | 19 | @Input() user: User |
20 | @Input() account: Account | 20 | @Input() account: Account |
21 | 21 | ||
22 | @Input() buttonSize: 'normal' | 'small' = 'normal' | 22 | @Input() buttonSize: 'normal' | 'small' = 'normal' |
23 | @Input() placement = 'left' | 23 | @Input() placement = 'left-top left-bottom auto' |
24 | @Input() label: string | 24 | @Input() label: string |
25 | 25 | ||
26 | @Output() userChanged = new EventEmitter() | 26 | @Output() userChanged = new EventEmitter() |