summaryrefslogtreecommitdiff
path: root/archaeological_finds/templates
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@iggdrasil.net>2019-09-18 12:36:00 +0200
committerÉtienne Loks <etienne.loks@iggdrasil.net>2019-09-18 12:36:00 +0200
commit63d9dd174fc702e974ac29359585c69041582b6a (patch)
tree7709cfcbbf57c3157b1287ac97e82478b3f7787a /archaeological_finds/templates
parent03986acbabef1d7868ca107964b8620e7385cb44 (diff)
downloadIshtar-63d9dd174fc702e974ac29359585c69041582b6a.tar.bz2
Ishtar-63d9dd174fc702e974ac29359585c69041582b6a.zip
QA find basket: use autocomplete for existing baskets
Diffstat (limited to 'archaeological_finds/templates')
-rw-r--r--archaeological_finds/templates/ishtar/forms/qa_find_basket.html44
1 files changed, 22 insertions, 22 deletions
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 @@
</div>{% endif %}
{% endfor %}
- {% if form.basket %}
+ {% if form.qa_bf_basket %}
<div class="form-row">
- <input type="radio" name="create_or_update" value="create"
- id="create-choice" checked >
- &nbsp;<label for="create-choice">{% trans "New" %}</label>
+ <input type="radio" name="qa_bf_create_or_update" value="create"
+ id="qa_bf_create-choice" checked >
+ &nbsp;<label for="qa_bf_create-choice">{% trans "New" %}</label>
</div>
{% else %}
- <input type="hidden" name="create_or_update" value="create">
+ <input type="hidden" name="qa_bf_create_or_update" value="create">
{% endif %}
- <div id="new-basket">
+ <div id="qa_bf_new-basket">
<div class="form-row">
- {% with form.label as field %}
+ {% with form.qa_bf_label as field %}
{% include "blocks/bs_field_snippet.html" %}
{% endwith %}
</div>
</div>
- {% if form.basket %}
+ {% if form.qa_bf_basket %}
<div class="form-row">
- <input type="radio" name="create_or_update" value="update"
- id="update-choice">
- &nbsp;<label for="update-choice">{% trans "Add" %}</label>
+ <input type="radio" name="qa_bf_create_or_update" value="update"
+ id="qa_bf_update-choice">
+ &nbsp;<label for="qa_bf_update-choice">{% trans "Add" %}</label>
</div>
- <div id="update-basket">
+ <div id="qa_bf_update-basket">
<div class="form-row">
- {% with form.basket as field %}
+ {% with form.qa_bf_basket as field %}
{% include "blocks/bs_field_snippet.html" %}
{% endwith %}
</div>
@@ -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 %}