LP2008918: use new default colors for modal headers
[evergreen-equinox.git] / Open-ILS / src / eg2 / src / app / staff / booking / create-reservation-dialog.component.html
1 <eg-patron-search-dialog #patronSearch>
2 </eg-patron-search-dialog>
3 <ng-template #dialogContent>
4   <div class="modal-header">
5     <h3 class="modal-title" i18n>Confirm Reservation Details</h3>
6     <button type="button" class="btn-close btn-close-white"
7       i18n-aria-label aria-label="Close"
8       (click)="dismiss('cross_click')"></button>
9   </div>
10   <form class="modal-body form-common" [formGroup]="create">
11     <div class="form-group row">
12       <label class="form-label col-lg-4 text-end fw-bold"
13         i18n for="create-patron-barcode">Patron barcode</label>
14       <div class="col-lg-7">
15         <input type="text" id="create-patron-barcode"
16         class="form-control " formControlName="patronBarcode" [disabled]="patronId">
17         <button class="btn btn-outline-dark btn-sm" (click)="searchPatrons()">
18           <span class="material-icons mat-icon-in-button align-middle"
19             i18n-title title="Search for Patron">search</span>
20           <span class="align-middle" i18n>Search for Patron</span>
21         </button>
22       </div>
23       <span class="col-lg-7 offset-lg-4" i18n>
24         {{ (patron$ | async)?.first_given_name}}
25         {{ (patron$ | async)?.second_given_name}}
26         {{ (patron$ | async)?.family_name}}
27       </span>
28     </div>
29     <div class="form-group row">
30       <label class="form-label col-lg-4 text-end fw-bold"
31         i18n for="create-end-time">Start time</label>
32       <eg-datetime-select
33         formControlName="startTime"
34         [timezone]="timezone">
35       </eg-datetime-select>
36     </div>
37     <div class="form-group row">
38       <label class="form-label col-lg-4 text-end fw-bold"
39         i18n for="create-end-time">End time</label>
40       <eg-datetime-select
41         formControlName="endTime"
42         [timezone]="timezone">
43       </eg-datetime-select>
44       <div role="alert" class="alert alert-danger offset-lg-4" *ngIf="create.errors?.datesOutOfOrder">
45         <span class="material-icons" aria-hidden="true">error</span>
46         <span i18n>Start time must be before end time</span>
47       </div>
48     </div>
49     <div class="form-group row">
50       <label class="form-label col-lg-4 text-end fw-bold"
51         i18n for="create-pickup-library">Reservation location</label>
52       <eg-org-select domId="create-pickup-library" [applyDefault]="true"
53         [disableOrgs]="disableOrgs()" [hideOrgs]="disableOrgs()"
54         (onChange)="handlePickupLibChange($event)">
55       </eg-org-select>
56       <eg-help-popover helpText="The library where the resource is picked up or used" i18n-helpText></eg-help-popover>
57     </div>
58     <div *ngIf="pickupLibraryUsesDifferentTz"
59       role="alert"
60       class="alert alert-info">
61       <span class="material-icons" aria-hidden="true">access_time</span>
62       <span i18n>Reservation location is in the {{timezone}} timezone</span>
63     </div>
64     <div class="form-group row">
65       <label class="form-label col-lg-4 text-end fw-bold"
66         i18n for="create-resource">Resource</label>
67       <input *ngIf="targetResource && targetResourceBarcode" id="create-resource" value="{{targetResourceBarcode}}" disabled>
68       <eg-combobox
69         formControlName="resourceList"
70         *ngIf="!(targetResource && targetResourceBarcode)"
71         startId="any">
72         <eg-combobox-entry entryId="any" entryLabel="Any resource"
73           i18n-entryLabel></eg-combobox-entry>
74         <eg-combobox-entry *ngFor="let r of resources" entryId="{{r.id()}}" entryLabel="{{r.barcode()}}">
75         </eg-combobox-entry>
76       </eg-combobox>
77     </div>
78     <div class="form-group row">
79       <label class="form-label col-lg-4 text-end fw-bold"
80         i18n for="create-email-notify">Notify by email?</label>
81       <input type="checkbox" formControlName="emailNotify">
82     </div>
83     <div class="form-group row">
84       <label class="form-label col-lg-4 text-end fw-bold"
85         i18n for="create-note">Note</label>
86       <input type="text" id="create-note"
87         class="form-control col-lg-7" formControlName="note">
88     </div>
89   </form>
90   <div class="modal-footer">
91     <button (click)="addBresv$().subscribe()" [disabled]="!create.valid" class="btn btn-info" i18n>Confirm reservation</button>
92     <button (click)="addBresvAndOpenPatronReservations()" [disabled]="!create.valid" class="btn btn-info" i18n>
93       Confirm and show patron reservations
94     </button>
95     <button (click)="close()" class="btn btn-warning ms-2" i18n>Cancel</button>
96   </div>
97 </ng-template>
98 <eg-alert-dialog #fail i18n-dialogBody
99   dialogBody="Could not create this reservation">
100 </eg-alert-dialog>