]> git.evergreen-ils.org Git - working/Evergreen.git/blob - Open-ILS/src/eg2/src/app/staff/admin/server/org-addr.component.html
LP1840050 Angular Org Unit Admin page port
[working/Evergreen.git] / Open-ILS / src / eg2 / src / app / staff / admin / server / org-addr.component.html
1
2 <ngb-tabset #addressTabs *ngIf="orgUnit" (tabChange)="tabChanged($event)">
3   <ng-container *ngFor="let type of addrTypes()">
4     <b>type = {{type}}</b>
5
6     <ngb-tab *ngIf="addr(type)"
7       i18n-title id="{{type}}"
8       title="{{type === 'billing_address' ? 'Physical Address' : 
9         (type === 'holds_address' ? 'Holds Address' : 
10         (type === 'mailing_address' ? 'Mailing Address' : 'ILL Address'))}}">
11
12       <ng-template ngbTabContent>
13         <eg-fm-record-editor idlClass="aoa" readonlyFields="org_unit" 
14           [mode]="addr(type).isnew() ? 'create': 'update'" 
15           [hideBanner]="true" displayMode="inline" hiddenFields="id"
16           (recordSaved)="addrSaved($event)" 
17           [record]="addr(type)"
18           fieldOrder="address_type,street1,street2,city,county,state,country,post_code,san,valid"
19           >
20           <eg-fm-record-editor-action i18n-label label="Delete" *ngIf="!addr(type).isnew()"
21             (actionClick)="deleteAddress($event)" buttonCss="btn-warning">
22           </eg-fm-record-editor-action>
23         </eg-fm-record-editor>
24
25         <ng-container *ngIf="sharedAddress(addr(type).id())">
26           <div class="alert alert-info">
27             <span i18n>This address is used for multiple address types.</span>
28             <button (click)="cloneAddress(type)" 
29               class="btn btn-light ml-3" i18n>Clone As New Address</button>
30           </div>
31         </ng-container>
32       </ng-template>
33     </ngb-tab>
34   </ng-container>
35 </ngb-tabset>
36