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="btn-close btn-close-white"
5 i18n-aria-label aria-label="Close" (click)="close()"></button>
7 <div class="modal-body">
8 <div class="row justify-content-center">
10 <h5 i18n>{{entry.label}}</h5>
13 <div class="row justify-content-center">
15 <span i18n [innerHTML]="entry.description"></span>
18 <div class="row mt-3">
19 <div class="col-md-6">
20 <div class="input-group">
21 <div class="input-group-text" i18n>Context</div>
22 <eg-org-select [initialOrg]="entryContext"
23 (onChange)="entryContext = $event"></eg-org-select>
27 <div class="row mt-2">
28 <div class="col-md-6">
29 <ng-container [ngSwitch]="inputType()">
31 <ng-container *ngSwitchCase="'integer'">
32 <div class="input-group">
33 <label class="form-label input-group-text" for="entryValue" i18n>Value</label>
35 class="form-control" type="number"
36 name="entryValue" id="entryValue"
37 placeholder="Input a numerical value"
39 [(ngModel)]="entryValue"/>
42 <ng-container *ngSwitchCase="'currency'">
43 <div class="input-group">
44 <div class="input-group-text" i18n>Value</div>
45 <div class="input-group-text" i18n>$</div>
47 class="form-control" type="number"
50 placeholder="Input a monetary value"
52 [(ngModel)]="entryValue"/>
55 <ng-container *ngSwitchCase="'string'">
56 <div class="input-group">
57 <div class="input-group-text" i18n>Value</div>
59 class="form-control" type="text"
61 placeholder="Input a value"
63 [(ngModel)]="entryValue"/>
66 <ng-container *ngSwitchCase="'interval'">
67 <div class="input-group">
68 <div class="input-group-text" i18n>Value</div>
70 class="form-control" type="text"
72 placeholder="e.g. 1 day, 4 months"
74 [(ngModel)]="entryValue"/>
77 <ng-container *ngSwitchCase="'bool'">
78 <div class="input-group">
79 <div class="input-group-text" i18n>Value</div>
81 class="form-select" name="entryValue"
82 placeholder="True or False" i18n-placeholder
83 [(ngModel)]="entryValue">
84 <option value='true' i18n>True</option>
85 <option value='false' i18n>False</option>
89 <ng-container *ngSwitchCase="'array'">
90 <div class="input-group">
91 <div class="input-group-text" i18n>Value</div>
93 class="form-control" type="text"
95 placeholder="Input a comma-separated list..."
97 [(ngModel)]="entryValue"/>
100 <ng-container *ngSwitchCase="'link'">
101 <div class="input-group">
102 <div class="input-group-text" i18n>Value</div>
103 <ng-container [ngSwitch]="entry.fmClass">
104 <ng-container *ngSwitchCase="'acpl'">
105 <eg-item-location-select [permFilter]="entry.view_perm"
106 [contextOrgId]="entryContext" (valueChange)="setInputValue($event ? $event.id() : null)">
107 </eg-item-location-select>
109 <ng-container *ngSwitchDefault>
110 <eg-combobox placeholder="Select a value" [idlClass]="entry.fmClass" idlField="name"
111 [asyncSupportsEmptyTermClick]="true" [displayTemplate]="fmClassLabel"
112 (onChange)="setInputValue($event ? $event.id : null)">
115 </ng-container><!-- fmClass ngSwitch -->
119 </ng-container> <!-- input type ngSwitch -->
123 <div class="modal-footer">
124 <button type="button" class="btn btn-success"
125 (click)="update()" i18n>Update Setting</button>
126 <button type="button" class="btn btn-warning"
127 (click)="delete()" i18n>Delete Setting</button>
131 <ng-template #fmClassLabel let-r="result" i18n>