|
36 | 36 | </ng-template> |
37 | 37 |
|
38 | 38 | @if (isSolrSuggest()) { |
39 | | - |
40 | | - <div *ngIf="(model.vocabularyOptions?.type === 'suggest')" class="position-relative right-addon"> |
41 | | - <i *ngIf="searching || loadingInitialValue" class="fas fa-circle-notch fa-spin fa-2x fa-fw text-primary position-absolute mt-1 p-0" aria-hidden="true"></i> |
42 | | - <i *ngIf="!searching && !loadingInitialValue" |
43 | | - dsAuthorityConfidenceState |
44 | | - class="far fa-circle fa-2x fa-fw position-absolute mt-1 p-0" |
45 | | - aria-hidden="true" |
46 | | - [authorityValue]="currentValue" |
47 | | - (whenClickOnConfidenceNotAccepted)="whenClickOnConfidenceNotAccepted($event)"></i> |
48 | | - <input #instance="ngbTypeahead" |
49 | | - class="form-control" |
50 | | - [attr.aria-labelledby]="'label_' + model.id" |
51 | | - [attr.autoComplete]="model.autoComplete" |
52 | | - [attr.aria-label]="model.label | translate" |
53 | | - [class.is-invalid]="showErrorMessages || (this.model.errorMessages !== null)" |
54 | | - [id]="model.id" |
55 | | - [inputFormatter]="formatter" |
56 | | - [name]="model.name" |
57 | | - [ngbTypeahead]="searchSuggest" |
58 | | - [placeholder]="model.placeholder" |
59 | | - [readonly]="model.readOnly" |
60 | | - [disabled]="model.readOnly" |
61 | | - [resultTemplate]="suggestrt" |
62 | | - [type]="model.inputType" |
63 | | - [(ngModel)]="currentValue" |
64 | | - (blur)="onBlur($event)" |
65 | | - (focus)="onFocus($event)" |
66 | | - (change)="onChange($event)" |
67 | | - (input)="onInput($event)" |
68 | | - (selectItem)="onSelectSuggestedTerm($event)"> |
69 | | - <div class="invalid-feedback" *ngIf="searchFailed">Sorry, suggestions could not be loaded.</div> |
70 | | - </div> |
| 39 | + @if (model.vocabularyOptions?.type === 'suggest') { |
| 40 | + <div *ngIf="(model.vocabularyOptions?.type === 'suggest')" class="position-relative right-addon"> |
| 41 | + @if (searching || loadingInitialValue) { |
| 42 | + <i class="fas fa-circle-notch fa-spin fa-2x fa-fw text-primary position-absolute mt-1 p-0" aria-hidden="true"></i> |
| 43 | + } |
| 44 | + @else { |
| 45 | + <i dsAuthorityConfidenceState |
| 46 | + class="far fa-circle fa-2x fa-fw position-absolute mt-1 p-0" |
| 47 | + aria-hidden="true" |
| 48 | + [authorityValue]="currentValue" |
| 49 | + (whenClickOnConfidenceNotAccepted)="whenClickOnConfidenceNotAccepted($event)"></i> |
| 50 | + } |
| 51 | + <input #instance="ngbTypeahead" |
| 52 | + class="form-control" |
| 53 | + [attr.aria-labelledby]="'label_' + model.id" |
| 54 | + [attr.autoComplete]="model.autoComplete" |
| 55 | + [attr.aria-label]="model.label | translate" |
| 56 | + [class.is-invalid]="showErrorMessages || (this.model.errorMessages !== null)" |
| 57 | + [id]="model.id" |
| 58 | + [inputFormatter]="formatter" |
| 59 | + [name]="model.name" |
| 60 | + [ngbTypeahead]="searchSuggest" |
| 61 | + [placeholder]="model.placeholder" |
| 62 | + [readonly]="model.readOnly" |
| 63 | + [disabled]="model.readOnly" |
| 64 | + [resultTemplate]="suggestrt" |
| 65 | + [type]="model.inputType" |
| 66 | + [(ngModel)]="currentValue" |
| 67 | + (blur)="onBlur($event)" |
| 68 | + (focus)="onFocus($event)" |
| 69 | + (change)="onChange($event)" |
| 70 | + (input)="onInput($event)" |
| 71 | + (selectItem)="onSelectSuggestedTerm($event)"> |
| 72 | + <div class="invalid-feedback" *ngIf="searchFailed">Sorry, suggestions could not be loaded.</div> |
| 73 | + </div> |
| 74 | + } |
71 | 75 |
|
72 | 76 | } @else { |
73 | 77 |
|
|
0 commit comments