diff options
author | Chocobozzz <me@florianbigard.com> | 2022-06-20 16:42:21 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2022-06-20 16:42:21 +0200 |
commit | 75084782b767f51f6158ada1984cf339c6302960 (patch) | |
tree | 178904ed08269de95683a063623d17cf87e56fad /client/src/app/shared/shared-forms/input-text.component.html | |
parent | 9bc3622320dc43474ce4b60c222ec25e6e657b97 (diff) | |
download | PeerTube-75084782b767f51f6158ada1984cf339c6302960.tar.gz PeerTube-75084782b767f51f6158ada1984cf339c6302960.tar.zst PeerTube-75084782b767f51f6158ada1984cf339c6302960.zip |
Handle input error in custom input text
Diffstat (limited to 'client/src/app/shared/shared-forms/input-text.component.html')
-rw-r--r-- | client/src/app/shared/shared-forms/input-text.component.html | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/client/src/app/shared/shared-forms/input-text.component.html b/client/src/app/shared/shared-forms/input-text.component.html index f890c4f02..abb53a085 100644 --- a/client/src/app/shared/shared-forms/input-text.component.html +++ b/client/src/app/shared/shared-forms/input-text.component.html | |||
@@ -3,6 +3,7 @@ | |||
3 | [id]="inputId" [autocomplete]="autocomplete" [value]="value" [placeholder]="placeholder" [tabindex]="tabindex" | 3 | [id]="inputId" [autocomplete]="autocomplete" [value]="value" [placeholder]="placeholder" [tabindex]="tabindex" |
4 | [(ngModel)]="value" (ngModelChange)="update()" [readonly]="readonly" | 4 | [(ngModel)]="value" (ngModelChange)="update()" [readonly]="readonly" |
5 | #input (click)="input.select()" (input)="update()" (change)="update()" [type]="inputType" class="form-control" | 5 | #input (click)="input.select()" (input)="update()" (change)="update()" [type]="inputType" class="form-control" |
6 | [ngClass]="{ 'input-error': formError }" | ||
6 | /> | 7 | /> |
7 | 8 | ||
8 | <button *ngIf="withToggle" (click)="toggle()" type="button" class="btn btn-outline-secondary" [title]="toggleTitle"> | 9 | <button *ngIf="withToggle" (click)="toggle()" type="button" class="btn btn-outline-secondary" [title]="toggleTitle"> |
@@ -18,3 +19,5 @@ | |||
18 | <span class="copy-text">Copy</span> | 19 | <span class="copy-text">Copy</span> |
19 | </button> | 20 | </button> |
20 | </div> | 21 | </div> |
22 | |||
23 | <div *ngIf="formError" class="form-error">{{ formError }}</div> | ||