LP1809288 Angular fm-editor read-only additions
[working/Evergreen.git] / Open-ILS / src / eg2 / src / app / share / org-select / org-select.component.html
index b032114..d4ffd53 100644 (file)
@@ -4,15 +4,23 @@
 {{r.label}}
 </ng-template>
 
-<input type="text" 
-  class="form-control"
-  [attr.id]="domId.length ? domId : null"
-  [placeholder]="placeholder"
-  [(ngModel)]="selected" 
-  [ngbTypeahead]="filter"
-  [resultTemplate]="displayTemplate"
-  [inputFormatter]="formatter"
-  (click)="click$.next($event.target.value)"
-  (selectItem)="orgChanged($event)"
-  #instance="ngbTypeahead"
-/>
+<ng-container *ngIf="readOnly">
+  <span>{{selected.label}}</span>
+</ng-container>
+
+<ng-container *ngIf="!readOnly">
+
+  <input type="text" 
+    class="form-control"
+    [attr.id]="domId.length ? domId : null"
+    [placeholder]="placeholder"
+    [(ngModel)]="selected" 
+    [ngbTypeahead]="filter"
+    [resultTemplate]="displayTemplate"
+    [inputFormatter]="formatter"
+    (click)="click$.next($event.target.value)"
+    (selectItem)="orgChanged($event)"
+    #instance="ngbTypeahead"
+  />
+
+</ng-container>