LP2008918: use new default colors for modal headers
[evergreen-equinox.git] / Open-ILS / src / eg2 / src / app / staff / admin / acq / currency / exchange-rates-dialog.component.html
1 <eg-string #successString i18n-text text="Exchange Rates Update Succeeded"></eg-string>
2 <eg-string #updateFailedString i18n-text text="Exchange Rates Update Failed"></eg-string>
3
4 <ng-template #dialogContent>
5   <div class="modal-header" *ngIf="doneLoading">
6     <h3 *ngIf="canUpdate" class="modal-title" i18n>Manage Exchange Rates for {{currency.code()}}: {{currency.label()}}</h3>
7     <h3 *ngIf="!canUpdate" class="modal-title" i18n>View Exchange Rates for {{currency.code()}}: {{currency.label()}}</h3>
8     <button type="button" class="btn-close btn-close-white"
9       i18n-aria-label aria-label="Close" (click)="close()"></button>
10   </div>
11   <div class="modal-body" [hidden]="!doneLoading">
12     <h4 i18n>Exchange rates to other currencies: 1 {{currency?.label()}} is equal to:</h4>
13     <div *ngIf="otherCurrencies?.length < 1" class="alert alert-warning" i18n>
14       No other currencies are currently defined, so cannot set any exchange rates.
15     </div>
16     <form #exrForm="ngForm" role="form" [hidden]="otherCurrencies?.length < 1" class="form-validated">
17       <div class="form-group row mt-2" *ngFor="let ratio of ratios">
18         <label for="exr-{{ratio.to_currency().code()}}" class="form-label col-sm-4 col-form-label">
19           {{ratio.to_currency().code()}} ({{ratio.to_currency().label()}})
20         </label>
21         <div class="col-sm-3">
22           <input *ngIf="canUpdate" class="form-control" type="number" id="exr-{{ratio.to_currency().code()}}"
23             [disabled]="ratio.id() === -1"
24             [ngModel]="ratio.ratio()" name="ratio_{{ratio.to_currency().code()}}"
25             (ngModelChange)="ratio.ratio($event)">
26           <span class="form-control-plaintext" *ngIf="!canUpdate">
27             <ng-container *ngIf="ratio.ratio() !== undefined">{{ratio.ratio()}}</ng-container>
28             <ng-container *ngIf="ratio.ratio() === undefined" i18n>not set</ng-container>
29           </span>
30         </div>
31         <div class="col-sm-3">
32           <span *ngIf="ratio.id() === -1" class="alert-warning" i18n>(inverse; go to other currency to change)</span>
33         </div>
34       </div>
35     </form>
36   </div>
37   <div class="modal-footer">
38     <ng-container *ngIf="canUpdate">
39       <button type="button" class="btn btn-info" [disabled]="!(exrForm?.dirty)"
40         (click)="save()" i18n>Save</button>
41       </ng-container>
42     <button type="button" class="btn btn-warning" *ngIf="canUpdate"
43       (click)="close()" i18n>Cancel</button>
44     <button type="button" class="btn btn-warning" *ngIf="!canUpdate"
45       (click)="close()" i18n>Close</button>
46   </div>
47 </ng-template>