From e0a0eeeecc5daeb2820f720fa608bd74aeaa2574 Mon Sep 17 00:00:00 2001 From: smilerz Date: Tue, 9 Feb 2021 12:55:40 -0600 Subject: [PATCH] add keyword during url import --- cookbook/templates/url_import.html | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/cookbook/templates/url_import.html b/cookbook/templates/url_import.html index 630b454d1..0fdc81141 100644 --- a/cookbook/templates/url_import.html +++ b/cookbook/templates/url_import.html @@ -190,6 +190,9 @@ :hide-selected="true" :preserve-search="true" placeholder="{% trans 'Select one' %}" + tag-placeholder="{% trans 'Add Keyword' %}" + :taggable="true" + @tag="addKeyword" label="text" track-by="id" id="id_keywords" @@ -357,6 +360,10 @@ this.units.push(new_unit.unit) this.recipe_data.recipeIngredient[index] = new_unit }, + addKeyword: function (tag) { + let new_keyword = {'text':tag,'id':null} + this.recipe_data.keywords.push(new_keyword) + }, openUnitSelect: function (id) { let index = id.replace('unit_', '') if (this.recipe_data.recipeIngredient[index].unit !== null) {