From e60666c795e1531fda90013a001ac6dbc58b5667 Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Fri, 20 Mar 2020 19:40:24 +0100 Subject: Refactoring and many fixes on file module --- ishtar_common/templates/blocks/JQueryAutocomplete.js | 2 +- ishtar_common/templates/blocks/bs_field_snippet.html | 1 + ishtar_common/templates/ishtar/forms/qa_new_item.html | 3 ++- ishtar_common/templates/ishtar/wizard/default_wizard.html | 2 ++ ishtar_common/templates/ishtar/wizard/parcels_wizard.html | 7 +++++-- 5 files changed, 11 insertions(+), 4 deletions(-) (limited to 'ishtar_common/templates') diff --git a/ishtar_common/templates/blocks/JQueryAutocomplete.js b/ishtar_common/templates/blocks/JQueryAutocomplete.js index 7cd0e2a60..aaf493db9 100644 --- a/ishtar_common/templates/blocks/JQueryAutocomplete.js +++ b/ishtar_common/templates/blocks/JQueryAutocomplete.js @@ -52,7 +52,7 @@ $(function() { {{safe_field_id}}_modify = function(){ var current_val = $('#id_{{field_id}}').val(); if (current_val){ - dt_qa_open('/modify-{{model_name}}/' + current_val + "/", + dt_qa_open('/modify-{{model_name}}/{{field_id}}/' + current_val + "/", 'modal-dynamic-form-{{model_name}}'); } } diff --git a/ishtar_common/templates/blocks/bs_field_snippet.html b/ishtar_common/templates/blocks/bs_field_snippet.html index 644f7f433..dcee87f7f 100644 --- a/ishtar_common/templates/blocks/bs_field_snippet.html +++ b/ishtar_common/templates/blocks/bs_field_snippet.html @@ -2,6 +2,7 @@
{% if field.label %}{{ field.label_tag }}{% endif %} + {% if extra_field_label %}{% endif %} {% if show_field_number or form.show_field_number %} {% if field.field.order_number %} {{field.field.order_number}} diff --git a/ishtar_common/templates/ishtar/forms/qa_new_item.html b/ishtar_common/templates/ishtar/forms/qa_new_item.html index ae57adfc2..435531594 100644 --- a/ishtar_common/templates/ishtar/forms/qa_new_item.html +++ b/ishtar_common/templates/ishtar/forms/qa_new_item.html @@ -3,7 +3,8 @@ {% block main_form %} {% if new_item_pk %} -

{% if new_item_label %}{{new_item_label}}{% else %}{% trans "Item" %}{% endif %} {% trans "created." %}

+

{% if new_item_label %}{{new_item_label}}{% else %}{% trans "Item" %}{% endif %} + {% if modify %}{% trans "modified." %}{% else %}{% trans "created." %}{% endif %}

{% else %} {% bs_compact_form form %} {% endif %} diff --git a/ishtar_common/templates/ishtar/wizard/default_wizard.html b/ishtar_common/templates/ishtar/wizard/default_wizard.html index b5ea4207c..cfd17e58f 100644 --- a/ishtar_common/templates/ishtar/wizard/default_wizard.html +++ b/ishtar_common/templates/ishtar/wizard/default_wizard.html @@ -62,6 +62,8 @@ $(document).ready(function(){ return false; }); {% if open_url %}load_window("{{open_url}}");{% endif %} + {% block "js_extra_ready" %} + {% endblock %} }); {% endblock %} diff --git a/ishtar_common/templates/ishtar/wizard/parcels_wizard.html b/ishtar_common/templates/ishtar/wizard/parcels_wizard.html index 2028d8792..d8c902c72 100644 --- a/ishtar_common/templates/ishtar/wizard/parcels_wizard.html +++ b/ishtar_common/templates/ishtar/wizard/parcels_wizard.html @@ -22,13 +22,16 @@ {% bs_form wizard.form.selection_form %} - {% for field in wizard.form.forms.0 %}{{ field.label_tag }}{% endfor %} + {% for field in wizard.form.forms.0 %} + {% if field.required %} + {{ field.label_tag }}{% if field.required %}{%else%}{% endif %}{% endfor %} + {% inline_formset 'Parcels' wizard.form.forms False %}
({% trans "all"%} )
{% if add_all %}

{% endif %} -
+
-- cgit v1.2.3