funky-framadate-front/src/app/features/administration/form/date/list/time/time-list.component.html

24 lines
859 B
HTML

<div class="time-list-container">
<div *ngFor="let time of timeSlices; index as id" class="time-choice">
<label class="label is-default" for="choice_{{ prefix_choice_id }}_timeChoices_{{ id }}">
{{ 'hours.element' | translate }} {{ id }}
</label>
<input
class="time-list-item input is-fullwidth"
[(ngModel)]="time.literal"
name="timeChoices_{{ id }}"
(keyup.arrowDown)="focusOnNextField(id)"
(keyup.arrowUp)="focusOnFieldNumber(id - 1)"
(keyup.arrowLeft)="removeTimeIfEmpty(time.literal, id)"
(keyup.alt.d)="removeTime(id)"
(blur)="removeTimeIfEmpty(time.literal, id)"
type="text"
id="choice_{{ prefix_choice_id }}_timeChoices_{{ id }}"
/>
<button (click)="removeTime(id)" class="button remove-item">
<img class="icon" src="assets/icons/x.svg" alt="{{ 'nav.remove' | translate }}" />
</button>
</div>
</div>