28 lines
1.4 KiB
HTML
28 lines
1.4 KiB
HTML
<div class="mb-3" [class.pb-3]="error">
|
|
<div class="row">
|
|
<div class="d-flex align-items-center position-relative hidden-button-container" [class.col-md-3]="horizontal">
|
|
@if (title) {
|
|
<label class="form-label" [class.mb-md-0]="horizontal" [for]="inputId">{{title}}</label>
|
|
}
|
|
@if (removable) {
|
|
<button type="button" class="btn btn-sm btn-danger position-absolute left-0" (click)="removed.emit(this)">
|
|
<i-bs name="x"></i-bs> <ng-container i18n>Remove</ng-container>
|
|
</button>
|
|
}
|
|
</div>
|
|
<div class="position-relative" [class.col-md-9]="horizontal">
|
|
<div class="input-group" [class.is-invalid]="error">
|
|
<span class="input-group-text fw-bold bg-light">{{monetaryValue | currency: currencyCode }}</span>
|
|
<input #currencyField class="form-control text-muted mw-60" tabindex="0" [(ngModel)]="currencyCode" maxlength="3" [class.is-invalid]="error" (change)="onChange(value)" [disabled]="disabled">
|
|
<input #inputField type="number" tabindex="0" class="form-control text-muted" step=".01" [id]="inputId" [(ngModel)]="monetaryValue" (change)="onChange(value)" [class.is-invalid]="error" [disabled]="disabled">
|
|
</div>
|
|
<div class="invalid-feedback position-absolute top-100">
|
|
{{error}}
|
|
</div>
|
|
@if (hint) {
|
|
<small class="form-text text-muted">{{hint}}</small>
|
|
}
|
|
</div>
|
|
</div>
|
|
</div>
|