diff options
author | Rigel Kent <sendmemail@rigelk.eu> | 2020-04-02 11:39:14 +0200 |
---|---|---|
committer | Rigel Kent <sendmemail@rigelk.eu> | 2020-04-02 11:39:14 +0200 |
commit | a6d5ff7604a3c2a94ff8814e2df7ca7bb2b48634 (patch) | |
tree | d8b27f30741ae3c9a2a72c68210644c16cd8d9b3 /client/src/app/shared | |
parent | 21973012ab06a93dd901821dbbe078eb793bac4d (diff) | |
download | PeerTube-a6d5ff7604a3c2a94ff8814e2df7ca7bb2b48634.tar.gz PeerTube-a6d5ff7604a3c2a94ff8814e2df7ca7bb2b48634.tar.zst PeerTube-a6d5ff7604a3c2a94ff8814e2df7ca7bb2b48634.zip |
Use form-control to display box-shadow on form inputs/selects upon focus
Diffstat (limited to 'client/src/app/shared')
8 files changed, 37 insertions, 21 deletions
diff --git a/client/src/app/shared/confirm/confirm.component.html b/client/src/app/shared/confirm/confirm.component.html index 65df1cd4d..dbc8c23e3 100644 --- a/client/src/app/shared/confirm/confirm.component.html +++ b/client/src/app/shared/confirm/confirm.component.html | |||
@@ -16,11 +16,15 @@ | |||
16 | </div> | 16 | </div> |
17 | 17 | ||
18 | <div class="modal-footer inputs"> | 18 | <div class="modal-footer inputs"> |
19 | <span i18n class="action-button action-button-cancel" (click)="dismiss()" role="button">Cancel</span> | 19 | <input |
20 | type="button" role="button" i18n-value value="Cancel" class="action-button action-button-cancel" | ||
21 | (click)="dismiss()" (key.enter)="dismiss()" | ||
22 | > | ||
20 | 23 | ||
21 | <input | 24 | <input |
25 | ngbAutofocus | ||
22 | type="submit" [value]="confirmButtonText" class="action-button-submit" [disabled]="isConfirmationDisabled()" | 26 | type="submit" [value]="confirmButtonText" class="action-button-submit" [disabled]="isConfirmationDisabled()" |
23 | (click)="close()" | 27 | (click)="close()" (key.enter)="confirm()" |
24 | > | 28 | > |
25 | </div> | 29 | </div> |
26 | </ng-template> | 30 | </ng-template> |
diff --git a/client/src/app/shared/confirm/confirm.component.ts b/client/src/app/shared/confirm/confirm.component.ts index d67d4f3c8..c6e40fe72 100644 --- a/client/src/app/shared/confirm/confirm.component.ts +++ b/client/src/app/shared/confirm/confirm.component.ts | |||
@@ -45,7 +45,6 @@ export class ConfirmComponent implements OnInit { | |||
45 | ) | 45 | ) |
46 | } | 46 | } |
47 | 47 | ||
48 | @HostListener('document:keydown.enter') | ||
49 | confirm () { | 48 | confirm () { |
50 | if (this.openedModal) this.openedModal.close() | 49 | if (this.openedModal) this.openedModal.close() |
51 | } | 50 | } |
diff --git a/client/src/app/shared/forms/markdown-textarea.component.html b/client/src/app/shared/forms/markdown-textarea.component.html index fb6e1343d..3cadb3619 100644 --- a/client/src/app/shared/forms/markdown-textarea.component.html +++ b/client/src/app/shared/forms/markdown-textarea.component.html | |||
@@ -1,7 +1,8 @@ | |||
1 | <div class="root" [ngStyle]="{ 'flex-direction': flexDirection }"> | 1 | <div class="root" [ngStyle]="{ 'flex-direction': flexDirection }"> |
2 | <textarea | 2 | <textarea |
3 | [(ngModel)]="content" (ngModelChange)="onModelChange()" | 3 | [(ngModel)]="content" (ngModelChange)="onModelChange()" |
4 | [ngClass]="classes" [ngStyle]="{ width: textareaWidth, height: textareaHeight, 'margin-right': textareaMarginRight }" | 4 | class="form-control" [ngClass]="classes" |
5 | [ngStyle]="{ width: textareaWidth, height: textareaHeight, 'margin-right': textareaMarginRight }" | ||
5 | [id]="name" [name]="name"> | 6 | [id]="name" [name]="name"> |
6 | </textarea> | 7 | </textarea> |
7 | 8 | ||
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/video/modals/video-blacklist.component.html b/client/src/app/shared/video/modals/video-blacklist.component.html index 857a4dcec..8f06a6b02 100644 --- a/client/src/app/shared/video/modals/video-blacklist.component.html +++ b/client/src/app/shared/video/modals/video-blacklist.component.html | |||
@@ -8,8 +8,10 @@ | |||
8 | 8 | ||
9 | <form novalidate [formGroup]="form" (ngSubmit)="blacklist()"> | 9 | <form novalidate [formGroup]="form" (ngSubmit)="blacklist()"> |
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 | [ngClass]="{ 'input-error': formErrors['reason'] }" class="form-control" | ||
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> |
@@ -27,9 +29,10 @@ | |||
27 | </div> | 29 | </div> |
28 | 30 | ||
29 | <div class="form-group inputs"> | 31 | <div class="form-group inputs"> |
30 | <span i18n class="action-button action-button-cancel" (click)="hide()"> | 32 | <input |
31 | Cancel | 33 | type="button" role="button" i18n-value value="Cancel" class="action-button action-button-cancel" |
32 | </span> | 34 | (click)="hide()" (key.enter)="hide()" |
35 | > | ||
33 | 36 | ||
34 | <input | 37 | <input |
35 | type="submit" i18n-value value="Submit" class="action-button-submit" | 38 | type="submit" i18n-value value="Submit" class="action-button-submit" |
diff --git a/client/src/app/shared/video/modals/video-download.component.html b/client/src/app/shared/video/modals/video-download.component.html index ab6f4449d..c65e371ee 100644 --- a/client/src/app/shared/video/modals/video-download.component.html +++ b/client/src/app/shared/video/modals/video-download.component.html | |||
@@ -95,9 +95,10 @@ | |||
95 | </div> | 95 | </div> |
96 | 96 | ||
97 | <div class="modal-footer inputs"> | 97 | <div class="modal-footer inputs"> |
98 | <span i18n class="action-button action-button-cancel" (click)="hide()"> | 98 | <input |
99 | Cancel | 99 | type="button" role="button" i18n-value value="Cancel" class="action-button action-button-cancel" |
100 | </span> | 100 | (click)="hide()" (key.enter)="hide()" |
101 | > | ||
101 | 102 | ||
102 | <input | 103 | <input |
103 | type="submit" i18n-value value="Download" class="action-button-submit" | 104 | type="submit" i18n-value value="Download" class="action-button-submit" |
diff --git a/client/src/app/shared/video/modals/video-report.component.html b/client/src/app/shared/video/modals/video-report.component.html index cc1d361b3..e336b6660 100644 --- a/client/src/app/shared/video/modals/video-report.component.html +++ b/client/src/app/shared/video/modals/video-report.component.html | |||
@@ -12,17 +12,20 @@ | |||
12 | 12 | ||
13 | <form novalidate [formGroup]="form" (ngSubmit)="report()"> | 13 | <form novalidate [formGroup]="form" (ngSubmit)="report()"> |
14 | <div class="form-group"> | 14 | <div class="form-group"> |
15 | <textarea i18n-placeholder placeholder="Reason..." formControlName="reason" [ngClass]="{ 'input-error': formErrors['reason'] }"> | 15 | <textarea |
16 | </textarea> | 16 | i18n-placeholder placeholder="Reason..." formControlName="reason" |
17 | [ngClass]="{ 'input-error': formErrors['reason'] }" class="form-control" | ||
18 | ></textarea> | ||
17 | <div *ngIf="formErrors.reason" class="form-error"> | 19 | <div *ngIf="formErrors.reason" class="form-error"> |
18 | {{ formErrors.reason }} | 20 | {{ formErrors.reason }} |
19 | </div> | 21 | </div> |
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()"> | 25 | <input |
24 | Cancel | 26 | type="button" role="button" i18n-value value="Cancel" class="action-button action-button-cancel" |
25 | </span> | 27 | (click)="hide()" (key.enter)="hide()" |
28 | > | ||
26 | 29 | ||
27 | <input | 30 | <input |
28 | type="submit" i18n-value value="Submit" class="action-button-submit" | 31 | type="submit" i18n-value value="Submit" class="action-button-submit" |
diff --git a/client/src/app/shared/video/video-miniature.component.html b/client/src/app/shared/video/video-miniature.component.html index 819be6d48..6a8558de3 100644 --- a/client/src/app/shared/video/video-miniature.component.html +++ b/client/src/app/shared/video/video-miniature.component.html | |||
@@ -52,7 +52,7 @@ | |||
52 | <div class="video-actions"> | 52 | <div class="video-actions"> |
53 | <!-- FIXME: remove bottom placement when overflow is fixed in bootstrap dropdown: https://github.com/ng-bootstrap/ng-bootstrap/issues/3495 --> | 53 | <!-- FIXME: remove bottom placement when overflow is fixed in bootstrap dropdown: https://github.com/ng-bootstrap/ng-bootstrap/issues/3495 --> |
54 | <my-video-actions-dropdown | 54 | <my-video-actions-dropdown |
55 | *ngIf="showActions" [video]="video" [displayOptions]="videoActionsDisplayOptions" placement="bottom-left bottom-right left" | 55 | *ngIf="showActions" [video]="video" [displayOptions]="videoActionsDisplayOptions" placement="bottom-left bottom-right left auto" |
56 | (videoRemoved)="onVideoRemoved()" (videoBlacklisted)="onVideoBlacklisted()" (videoUnblacklisted)="onVideoUnblacklisted()" | 56 | (videoRemoved)="onVideoRemoved()" (videoBlacklisted)="onVideoBlacklisted()" (videoUnblacklisted)="onVideoUnblacklisted()" |
57 | ></my-video-actions-dropdown> | 57 | ></my-video-actions-dropdown> |
58 | </div> | 58 | </div> |