LP1830432: Make the org-family-select reusable
[working/Evergreen.git] / Open-ILS / src / eg2 / src / app / staff / share / admin-page / admin-page.component.html
index 855f196..ab6c263 100644 (file)
 <eg-string #createErrString [template]="createErrStrTmpl"></eg-string>
 
 <ng-container *ngIf="orgField">
-  <div class="d-flex">
-    <div>
-      <div class="input-group">
-        <div class="input-group-prepend">
-          <span class="input-group-text">{{orgFieldLabel}}</span>
-        </div>
-        <eg-org-select 
-          [limitPerms]="viewPerms"
-          [initialOrg]="contextOrg"
-          (onChange)="orgOnChange($event)">
-        </eg-org-select>
-      </div>
-    </div>
-    <div class="pl-2">
-      <div class="form-check">
-        <input type="checkbox" (click)="grid.reload()" 
-          [disabled]="disableAncestorSelector()"
-          [(ngModel)]="includeOrgAncestors"
-          class="form-check-input" id="include-ancestors">
-        <label class="form-check-label" for="include-ancestors" i18n>+ Ancestors</label>
-      </div>
-      <div class="form-check">
-        <input type="checkbox" (click)="grid.reload()" 
-          [disabled]="disableDescendantSelector()"
-          [(ngModel)]="includeOrgDescendants" 
-          class="form-check-input" id="include-descendants">
-        <label class="form-check-label" for="include-descendants" i18n>+ Descendants</label>
-      </div>
-    </div>
-  </div>
+  <eg-org-family-select
+    [limitPerms]="viewPerms" 
+    [selectedOrgId]="contextOrg.id()"
+    [(ngModel)]="searchOrgs"
+    (ngModelChange)="grid.reload()">
+  </eg-org-family-select>
   <hr/>
 </ng-container>