f5cb3e93132dae984a370ebc8ec46ddcee2322ed
[evergreen-equinox.git] / Open-ILS / src / eg2 / src / app / staff / admin / acq / edi_attr_set / edi-attr-set-edit-dialog.component.html
1 <ng-template #dialogContent>
2   <div class="modal-header bg-info">
3     <h3 *ngIf="mode === 'create'" class="modal-title" i18n>New EDI Attribute Set</h3>
4     <h3 *ngIf="mode === 'update'" class="modal-title" i18n>Modify EDI Attribute Set</h3>
5     <h3 *ngIf="mode === 'clone'" class="modal-title" i18n>Clone EDI Attribute Set (from {{clonedLabel}})</h3>
6     <button type="button" class="close"
7       i18n-aria-label aria-label="Close" (click)="close()">
8       <span aria-hidden="true">&times;</span>
9     </button>
10   </div>
11   <div class="modal-body">
12     <form #myForm="ngForm" role="form" class="form-validated">
13       <div class="form-group row mt-2" *ngIf="attrSet">
14         <label for="attr-set-label" class="col-sm-3 col-form-label" i18n>Attribute Set Label
15         </label>
16         <div class="col-sm-3">
17           <input class="form-control" type="text" id="attr-set-label"
18             required="required" pattern="[\s\S]*\S[\s\S]*"
19             [ngModel]="attrSet.label()" name="label"
20             (ngModelChange)="attrSet.label($event)">
21         </div>
22       </div>
23       <table class="table table-striped table-sm col-lg-10 offset-lg-1">
24         <thead>
25           <tr>
26             <td>&nbsp;</td>
27             <td i81n>Attribute</td>
28             <td i81n>Description</td>
29           </tr>
30         </thead>
31         <tr *ngFor="let inp of attrInputs">
32           <td><input type="checkbox" [(ngModel)]="inp.selected"
33                id="attr-map-{{inp.key}}" name="attr-map-{{inp.key}}"></td>
34           <td><label for="attr-map-{{inp.key}}">{{inp.key}}</label></td>
35           <td>{{inp.label}}</td>
36         </tr>
37       </table>
38     </form>
39   </div>
40   <div class="modal-footer">
41     <button type="button" class="btn btn-info" [disabled]="!myForm?.valid || !(myForm?.dirty)"
42       (click)="save()" i18n>Save</button>
43     <button type="button" class="btn btn-warning"
44       (click)="close()" i18n>Cancel</button>
45   </div>
46 </ng-template>