aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/shared/shared-forms/input-text.component.html
blob: abb53a085638cf0301fb30d87081e362726bfdc3 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
<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>

  <button
    *ngIf="withCopy" [cdkCopyToClipboard]="input.value" (click)="activateCopiedMessage()" type="button"
    class="btn btn-outline-secondary text-uppercase" i18n-title title="Copy"
  >
    <my-global-icon iconName="copy"></my-global-icon>
    <span class="copy-text">Copy</span>
  </button>
</div>

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