aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/shared/shared-forms/input-text.component.html
blob: 4747e2f8f152d9c246e43064779bd06f352f5d58 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
<div class="input-group">
  <input
    [id]="inputId" [autocomplete]="autocomplete" [value]="value" [placeholder]="placeholder" [tabindex]="tabindex"
    [(ngModel)]="value" (ngModelChange)="update()" [readonly]="readonly"
    #input (click)="input.select()" (input)="update()" (change)="update()" [type]="inputType" class="form-control"
    [ngClass]="{ 'input-error': formError }"
  />

  <button *ngIf="withToggle" (click)="toggle()" type="button" class="btn btn-outline-secondary" [title]="toggleTitle">
    <my-global-icon *ngIf="show" iconName="eye-open"></my-global-icon>
    <my-global-icon *ngIf="!show" iconName="eye-close"></my-global-icon>
  </button>

  <my-copy-button
    *ngIf="withCopy" [value]="input.value" i18n-notification notification="Copied"
    [isInputGroup]="true" i18n
  >
    COPY
  </my-copy-button>
</div>

<div *ngIf="formError" class="form-error">{{ formError }}</div>