Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 | 2x | <ng-container *ngIf="select('visible') | async">
<div *ngIf="select('editMode') | async as editMode" class="row">
<div class="offset-2 col-10 list-item-actions pt-0">
<ish-line-item-custom-fields *ngIf="collapsed" [lineItem]="select('lineItem') | async" [editable]="editable" />
<button
*ngIf="editable"
(click)="collapsed = !collapsed"
type="button"
class="btn btn-link btn-link-with-icon"
[attr.aria-expanded]="!collapsed"
[attr.aria-controls]="'line-item-information-input_' + getLineItemId()"
data-testing-id="line-item-custom-fields-toggle-link"
>
{{
(editMode === 'edit' ? 'checkout.custom-fields.edit.link.label' : 'checkout.custom-fields.add.link.label')
| translate
}}
<fa-icon [icon]="['fas', collapsed ? 'angle-down' : 'angle-up']" />
</button>
<div [id]="'line-item-information-input_' + getLineItemId()" [ngbCollapse]="collapsed">
<form [formGroup]="customFieldsForm" ishFormSubmit (ngSubmit)="save()">
<ish-custom-fields-formly
[form]="customFieldsForm"
[fields]="select('customFields') | async"
fieldClass="col-md-8 col-xl-6"
/>
<div class="row">
<div class="col-12 offset-md-4 col-md-8">
<button type="submit" class="btn btn-primary">
{{
(editMode === 'edit'
? 'checkout.custom-fields.save.button.label'
: 'checkout.custom-fields.add.button.label'
) | translate
}}
</button>
<button (click)="cancel()" type="button" class="btn btn-secondary">
{{ 'checkout.custom-fields.cancel.button.label' | translate }}
</button>
</div>
</div>
</form>
</div>
</div>
</div>
</ng-container>
|