From 63d9dd174fc702e974ac29359585c69041582b6a Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Wed, 18 Sep 2019 12:36:00 +0200 Subject: QA find basket: use autocomplete for existing baskets --- .../templates/ishtar/forms/qa_find_basket.html | 44 +++++++++++----------- 1 file changed, 22 insertions(+), 22 deletions(-) (limited to 'archaeological_finds/templates') diff --git a/archaeological_finds/templates/ishtar/forms/qa_find_basket.html b/archaeological_finds/templates/ishtar/forms/qa_find_basket.html index 77fc2abcd..c9224078a 100644 --- a/archaeological_finds/templates/ishtar/forms/qa_find_basket.html +++ b/archaeological_finds/templates/ishtar/forms/qa_find_basket.html @@ -15,31 +15,31 @@ {% endif %} {% endfor %} - {% if form.basket %} + {% if form.qa_bf_basket %}
- -   + +  
{% else %} - + {% endif %} -
+
- {% with form.label as field %} + {% with form.qa_bf_label as field %} {% include "blocks/bs_field_snippet.html" %} {% endwith %}
- {% if form.basket %} + {% if form.qa_bf_basket %}
- -   + +  
-
+
- {% with form.basket as field %} + {% with form.qa_bf_basket as field %} {% include "blocks/bs_field_snippet.html" %} {% endwith %}
@@ -48,20 +48,20 @@ {% endblock %} {% block js %} -var update_form_display = function(){ - if ($("#update-choice:checked").length){ - $("#new-basket").hide(); - $("#update-basket").show(); +var qa_bf_update_form_display = function(){ + if ($("#qa_bf_update-choice:checked").length){ + $("#qa_bf_new-basket").hide(); + $("#qa_bf_update-basket").show(); } else { - $("#update-basket").hide(); - $("#new-basket").show(); + $("#qa_bf_update-basket").hide(); + $("#qa_bf_new-basket").show(); } } $(document).ready(function(){ - $("#create-choice").click(update_form_display); - $("#update-choice").click(update_form_display); - update_form_display(); + $("#qa_bf_create-choice").click(qa_bf_update_form_display); + $("#qa_bf_update-choice").click(qa_bf_update_form_display); + qa_bf_update_form_display(); }); {% endblock %} -- cgit v1.2.3