From 0b99dd12ad471b8b22213612cd3524b8529dd527 Mon Sep 17 00:00:00 2001 From: Alex ORLUC <alex.orluc@maarch.org> Date: Mon, 23 Sep 2019 19:37:33 +0200 Subject: [PATCH] FIX #11269 TIME 0:10 add autocomplete input field list --- .../app/indexation/field-list/field-list.component.html | 2 +- .../indexation/indexing-form/indexing-form.component.ts | 7 +++++++ src/frontend/lang/lang-en.ts | 1 + src/frontend/lang/lang-fr.ts | 1 + src/frontend/lang/lang-nl.ts | 1 + 5 files changed, 11 insertions(+), 1 deletion(-) diff --git a/src/frontend/app/indexation/field-list/field-list.component.html b/src/frontend/app/indexation/field-list/field-list.component.html index 3e826f8eb60..4f488b3c67d 100644 --- a/src/frontend/app/indexation/field-list/field-list.component.html +++ b/src/frontend/app/indexation/field-list/field-list.component.html @@ -10,7 +10,7 @@ {{field.label}} </div> <div class="fieldInput" [class.advancedInput]="field.type === 'checkbox'"> - <ng-container *ngIf="field.type === 'string'"> + <ng-container *ngIf="field.type === 'string' || field.type === 'autocomplete'"> <mat-form-field class="input-form" floatLabel="never"> <textarea matInput [placeholder]="lang[field.type + 'Input']" matTextareaAutosize matAutosizeMinRows="1" cdkAutosizeMaxRows="6" disabled></textarea> diff --git a/src/frontend/app/indexation/indexing-form/indexing-form.component.ts b/src/frontend/app/indexation/indexing-form/indexing-form.component.ts index ce0ab05b656..db6c5daa105 100644 --- a/src/frontend/app/indexation/indexing-form/indexing-form.component.ts +++ b/src/frontend/app/indexation/indexing-form/indexing-form.component.ts @@ -160,6 +160,13 @@ export class IndexingFormComponent implements OnInit { type: 'date', default_value : '', values: [] + }, + { + identifier: 'tags', + label: this.lang.tags, + type: 'autocomplete', + default_value : '', + values: ['/rest/autocomplete/tags'] } ]; availableFieldsClone: any[] = []; diff --git a/src/frontend/lang/lang-en.ts b/src/frontend/lang/lang-en.ts index 1b995e18787..c18acab4058 100755 --- a/src/frontend/lang/lang-en.ts +++ b/src/frontend/lang/lang-en.ts @@ -1120,4 +1120,5 @@ export const LANG_EN = { "noSelectedValue" : "No selected value", "searchValue" : "Search a value", "initiatorEntityAlt" : "Initiator entity", + "autocompleteInput" : "Autocomplete input", }; diff --git a/src/frontend/lang/lang-fr.ts b/src/frontend/lang/lang-fr.ts index 67061e5a18f..be9a44e91ac 100755 --- a/src/frontend/lang/lang-fr.ts +++ b/src/frontend/lang/lang-fr.ts @@ -1157,4 +1157,5 @@ export const LANG_FR = { "noSelectedValue" : "Aucun élément sélectionné", "searchValue" : "Rechercher un élément", "initiatorEntityAlt" : "Entité initiatrice", + "autocompleteInput" : "Auto-completion", }; diff --git a/src/frontend/lang/lang-nl.ts b/src/frontend/lang/lang-nl.ts index 6971e145e32..cad75edb387 100755 --- a/src/frontend/lang/lang-nl.ts +++ b/src/frontend/lang/lang-nl.ts @@ -1146,4 +1146,5 @@ export const LANG_NL = { "noSelectedValue" : "No selected value", //_TO_TRANSLATE "searchValue" : "Search a value", //_TO_TRANSLATE "initiatorEntityAlt" : "Initiator entity", //_TO_TRANSLATE + "autocompleteInput" : "Autocomplete input", //_TO_TRANSLATE }; -- GitLab