From 1d90e7c7001c21c9e8a5d1f3683c2acd1873973f Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Fri, 10 Apr 2020 17:11:20 +0200 Subject: Container: adapt forms for the new container management --- ishtar_common/templates/blocks/JQueryAutocomplete.js | 2 ++ ishtar_common/templates/ishtar/wizard/default_wizard.html | 2 ++ ishtar_common/widgets.py | 10 ++++++---- 3 files changed, 10 insertions(+), 4 deletions(-) (limited to 'ishtar_common') diff --git a/ishtar_common/templates/blocks/JQueryAutocomplete.js b/ishtar_common/templates/blocks/JQueryAutocomplete.js index aaf493db9..54b0cb645 100644 --- a/ishtar_common/templates/blocks/JQueryAutocomplete.js +++ b/ishtar_common/templates/blocks/JQueryAutocomplete.js @@ -1,6 +1,7 @@ {% load replace_underscore %} var base_source_{{field_id|replace_underscore}} = {{source}}; var source_{{field_id|replace_underscore}} = base_source_{{field_id|replace_underscore}}; +var current_label_{{field_id|replace_underscore}}; $(function() { $("#id_select_{{field_id}}").autocomplete({ @@ -8,6 +9,7 @@ $(function() { select: function( event, ui ) { if(ui.item){ $('#id_{{field_id}}').val(ui.item.id); + current_label_{{field_id|replace_underscore}} = ui.item.label; $('#id_{{field_id}}').change(); } else { $('#id_{{field_id}}').val(null); diff --git a/ishtar_common/templates/ishtar/wizard/default_wizard.html b/ishtar_common/templates/ishtar/wizard/default_wizard.html index cfd17e58f..c279a37e0 100644 --- a/ishtar_common/templates/ishtar/wizard/default_wizard.html +++ b/ishtar_common/templates/ishtar/wizard/default_wizard.html @@ -52,6 +52,8 @@ {% endblock %}