|
3 | 3 | [ngClass]="{ 'ds-warning': mdValue.reordered || mdValue.change === DsoEditMetadataChangeTypeEnum.UPDATE, 'ds-danger': mdValue.change === DsoEditMetadataChangeTypeEnum.REMOVE, 'ds-success': mdValue.change === DsoEditMetadataChangeTypeEnum.ADD, 'h-100': isOnlyValue }"> |
4 | 4 | <div class="flex-grow-1 ds-flex-cell ds-value-cell d-flex flex-column" *ngVar="(mdRepresentation$ | async) as mdRepresentation" role="cell"> |
5 | 5 | <div class="dont-break-out preserve-line-breaks" *ngIf="!mdValue.editing && !mdRepresentation">{{ mdValue.newValue.value }}</div> |
6 | | - <textarea class="form-control" rows="5" *ngIf="mdValue.editing && !mdRepresentation && ((isAuthorityControlled() | async) !== true || enabledFreeTextEditing)" [(ngModel)]="mdValue.newValue.value" |
| 6 | + <textarea class="form-control" rows="5" *ngIf="mdValue.editing && !mdRepresentation && ((isAuthorityControlled() | async) !== true || (enabledFreeTextEditing && (isSuggesterVocabulary() | async) !== true))" [(ngModel)]="mdValue.newValue.value" |
7 | 7 | [attr.aria-label]="(dsoType + '.edit.metadata.edit.value') | translate" |
8 | 8 | [dsDebounce]="300" (onDebounce)="confirm.emit(false)"></textarea> |
9 | 9 | <ds-dynamic-scrollable-dropdown *ngIf="mdValue.editing && (isScrollableVocabulary() | async) && !enabledFreeTextEditing" |
|
12 | 12 | [model]="getModel()" |
13 | 13 | (change)="onChangeAuthorityField($event)"> |
14 | 14 | </ds-dynamic-scrollable-dropdown> |
15 | | - <button class="btn btn-secondary mt-2" *ngIf="mdValue.editing && (isScrollableVocabulary() | async)" |
| 15 | + <ds-dynamic-onebox *ngIf="mdValue.editing && (((isHierarchicalVocabulary() | async) && !enabledFreeTextEditing) || (isSuggesterVocabulary() | async))" |
| 16 | + [group]="group" |
| 17 | + [model]="getModel()" |
| 18 | + (change)="onChangeAuthorityField($event)"> |
| 19 | + </ds-dynamic-onebox> |
| 20 | + <button class="btn btn-secondary mt-2" *ngIf="mdValue.editing && ((isScrollableVocabulary() | async) || (isHierarchicalVocabulary() | async))" |
16 | 21 | [title]="enabledFreeTextEditing ? dsoType + '.edit.metadata.edit.buttons.disable-free-text-editing' : dsoType + '.edit.metadata.edit.buttons.enable-free-text-editing' | translate" |
17 | 22 | (click)="toggleFreeTextEdition()"> |
18 | 23 | <i class="fas fa-fw" [ngClass]="enabledFreeTextEditing ? 'fa-lock' : 'fa-unlock'"></i> |
19 | 24 | {{ (enabledFreeTextEditing ? dsoType + '.edit.metadata.edit.buttons.disable-free-text-editing' : dsoType + '.edit.metadata.edit.buttons.enable-free-text-editing') | translate }} |
20 | 25 | </button> |
21 | | - <ds-dynamic-onebox *ngIf="mdValue.editing && ((isHierarchicalVocabulary() | async) || (isSuggesterVocabulary() | async))" |
22 | | - [group]="group" |
23 | | - [model]="getModel()" |
24 | | - (change)="onChangeAuthorityField($event)"> |
25 | | - </ds-dynamic-onebox> |
26 | 26 | <div *ngIf="!isVirtual && !mdValue.editing && mdValue.newValue.authority && mdValue.newValue.confidence !== ConfidenceTypeEnum.CF_UNSET && mdValue.newValue.confidence !== ConfidenceTypeEnum.CF_NOVALUE"> |
27 | 27 | <span class="badge badge-light border" > |
28 | 28 | <i dsAuthorityConfidenceState |
|
0 commit comments