1 <ng-template #dialogContent>
2 <div class="modal-header bg-info">
3 <h4 class="modal-title" i18n>Edit Setting</h4>
4 <button type="button" class="close"
5 i18n-aria-label aria-label="Close" (click)="close()">
6 <span aria-hidden="true">×</span>
9 <div class="modal-body">
10 <div class="row justify-content-center">
12 <h5 i18n>{{entry.label}}</h5>
15 <div class="row justify-content-center">
17 <span i18n [innerHTML]="entry.description"></span>
20 <div class="row mt-3">
21 <div class="col-md-6">
22 <div class="input-group">
23 <div class="input-group-prepend">
24 <div class="input-group-text" i18n>Context</div>
25 <eg-org-select [initialOrg]="entryContext"
26 (onChange)="entryContext = $event"></eg-org-select>
31 <div class="row mt-2">
32 <div class="col-md-6">
33 <ng-container [ngSwitch]="inputType()">
35 <ng-container *ngSwitchCase="'integer'">
36 <div class="input-group">
37 <div class="input-group-prepend">
38 <div class="input-group-text" i18n>Value</div>
40 class="form-control" type="number"
42 placeholder="Input a numerical value"
44 [(ngModel)]="entryValue"/>
48 <ng-container *ngSwitchCase="'currency'">
49 <div class="input-group">
50 <div class="input-group-prepend">
51 <div class="input-group-text" i18n>Value</div>
52 <div class="input-group-text" i18n>$</div>
54 class="form-control" type="number"
57 placeholder="Input a monetary value"
59 [(ngModel)]="entryValue"/>
63 <ng-container *ngSwitchCase="'string'">
64 <div class="input-group">
65 <div class="input-group-prepend">
66 <div class="input-group-text" i18n>Value</div>
68 class="form-control" type="text"
70 placeholder="Input a value"
72 [(ngModel)]="entryValue"/>
76 <ng-container *ngSwitchCase="'interval'">
77 <div class="input-group">
78 <div class="input-group-prepend">
79 <div class="input-group-text" i18n>Value</div>
81 class="form-control" type="text"
83 placeholder="e.g. 1 day, 4 months"
85 [(ngModel)]="entryValue"/>
89 <ng-container *ngSwitchCase="'bool'">
90 <div class="input-group">
91 <div class="input-group-prepend">
92 <div class="input-group-text" i18n>Value</div>
94 class="custom-select" name="entryValue"
95 placeholder="True or False" i18n-placeholder
96 [(ngModel)]="entryValue">
97 <option value='true' i18n>True</option>
98 <option value='false' i18n>False</option>
103 <ng-container *ngSwitchCase="'array'">
104 <div class="input-group">
105 <div class="input-group-prepend">
106 <div class="input-group-text" i18n>Value</div>
108 class="form-control" type="text"
110 placeholder="Input a comma-separated list..."
112 [(ngModel)]="entryValue"/>
116 <ng-container *ngSwitchCase="'link'">
117 <div class="input-group">
118 <div class="input-group-prepend">
119 <div class="input-group-text" i18n>Value</div>
120 <ng-container [ngSwitch]="entry.fmClass">
121 <ng-container *ngSwitchCase="'acpl'">
122 <eg-item-location-select [permFilter]="entry.view_perm"
123 [contextOrgId]="entryContext" (valueChange)="setInputValue($event ? $event.id() : null)">
124 </eg-item-location-select>
126 <ng-container *ngSwitchDefault>
127 <eg-combobox placeholder="Select a value" [idlClass]="entry.fmClass" idlField="name"
128 [asyncSupportsEmptyTermClick]="true" [displayTemplate]="fmClassLabel"
129 (onChange)="setInputValue($event ? $event.id : null)">
132 </ng-container><!-- fmClass ngSwitch -->
137 </ng-container> <!-- input type ngSwitch -->
141 <div class="modal-footer">
142 <button type="button" class="btn btn-success"
143 (click)="update()" i18n>Update Setting</button>
144 <button type="button" class="btn btn-warning"
145 (click)="delete()" i18n>Delete Setting</button>
149 <ng-template #fmClassLabel let-r="result" i18n>