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 51 52 53 54 55 56 | 2x | <ng-template #modal let-selectModal>
<div class="modal-header">
<h2 id="product-notification-edit-modal-title" class="modal-title">
<ng-container *ngIf="product$ | async as product">
{{ product.name }}
</ng-container>
</h2>
<button type="button" class="btn-close" [title]="'dialog.close.text' | translate" (click)="hide()"></button>
</div>
<ng-container *ngIf="productNotification$ | async as productNotification; else createNotificationButton">
<form [formGroup]="productNotificationForm" ishFormSubmit #form="ngForm" (ngSubmit)="submitForm()" novalidate>
<div class="modal-body">
<ish-product-image imageType="L" />
<ish-product-notification-edit-form
[form]="productNotificationForm"
[productNotification]="productNotification"
[userEmail]="userEmail$ | async"
/>
</div>
<div class="modal-footer">
<button
type="submit"
class="btn btn-primary"
[disabled]="productNotificationForm.invalid && form.submitted"
data-testing-id="product-notification-edit-dialog-edit"
>
{{ 'product.notification.edit.form.update.button.label' | translate }}
</button>
<button type="button" class="btn btn-secondary" (click)="hide()">
{{ 'product.notification.edit.form.cancel.button.label' | translate }}
</button>
</div>
</form>
</ng-container>
<ng-template #createNotificationButton>
<form [formGroup]="productNotificationForm" ishFormSubmit (ngSubmit)="submitForm()" novalidate>
<div class="modal-body">
<ish-product-image imageType="L" />
<ish-product-notification-edit-form [form]="productNotificationForm" [userEmail]="userEmail$ | async" />
</div>
<div class="modal-footer">
<button type="submit" class="btn btn-primary">
{{ 'product.notification.edit.form.create.button.label' | translate }}
</button>
<button type="button" class="btn btn-secondary" (click)="hide()">
{{ 'product.notification.edit.form.cancel.button.label' | translate }}
</button>
</div>
</form>
</ng-template>
</ng-template>
|