108055: fix issue 8686: unable to enter freetext values in the submission form for vocabulary

This commit is contained in:
Jens Vannerum
2023-11-08 10:25:27 +01:00
parent e62832f9d3
commit 0dcf6cb885
3 changed files with 14 additions and 0 deletions

View File

@@ -10,6 +10,9 @@
<button class="btn btn-outline-secondary" type="button" (click)="reset()"> <button class="btn btn-outline-secondary" type="button" (click)="reset()">
{{'vocabulary-treeview.search.form.reset' | translate}} {{'vocabulary-treeview.search.form.reset' | translate}}
</button> </button>
<button class="btn btn-outline-primary" type="button" (click)="add()" [disabled]="this.vocabularyOptions.closed">
{{'vocabulary-treeview.search.form.add' | translate}}
</button>
</div> </div>
</div> </div>
</div> </div>

View File

@@ -293,6 +293,15 @@ export class VocabularyTreeviewComponent implements OnDestroy, OnInit, OnChanges
} }
} }
add() {
const userVocabularyEntry = {
value: this.searchText,
display: this.searchText,
} as VocabularyEntryDetail;
this.select.emit(userVocabularyEntry);
}
/** /**
* Unsubscribe from all subscriptions * Unsubscribe from all subscriptions
*/ */

View File

@@ -5240,4 +5240,6 @@
"access-control-option-end-date-note": "Select the date until which the related access condition is applied", "access-control-option-end-date-note": "Select the date until which the related access condition is applied",
"vocabulary-treeview.search.form.add": "Add",
} }