]> git.evergreen-ils.org Git - working/Evergreen.git/blob - Open-ILS/src/eg2/src/app/share/dialog/prompt.component.html
LP1904036 Prompt dialog focus input; submit on enter
[working/Evergreen.git] / Open-ILS / src / eg2 / src / app / share / dialog / prompt.component.html
1 <ng-template #dialogContent>
2   <div class="modal-header bg-info">
3     <h4 class="modal-title">{{dialogTitle}}</h4>
4     <button type="button" class="close" 
5       i18n-aria-label aria-label="Close" (click)="close()">
6       <span aria-hidden="true">&times;</span>
7     </button>
8   </div>
9   <div class="modal-body">
10     <p>{{dialogBody}}</p>
11     <div class="text-center">
12         <input type="{{promptType}}" class="form-control" id="{{inputDomId}}"
13           [attr.min]="promptType == 'number' ? promptMin : ''"
14           [attr.max]="promptType == 'number' ? promptMax : ''"
15           (keyup.enter)="close(promptValue)" [(ngModel)]="promptValue"/>
16     </div>
17   </div>
18   <div class="modal-footer">
19     <button type="button" class="btn btn-success" 
20       (click)="close(promptValue)" i18n>Confirm</button>
21     <button type="button" class="btn btn-warning" 
22       (click)="close()" i18n>Cancel</button>
23   </div>
24 </ng-template>