From 875462381bc57b13a8ca6b68a52ad1ca065ef95e Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Thu, 7 Jun 2018 16:52:02 +0200 Subject: Document form: add related fields (refs #4107) --- .../templates/blocks/bs_form_snippet.html | 15 ++++++++- ishtar_common/templates/ishtar/forms/document.html | 38 ++++++++++++++++++++++ 2 files changed, 52 insertions(+), 1 deletion(-) create mode 100644 ishtar_common/templates/ishtar/forms/document.html (limited to 'ishtar_common/templates') diff --git a/ishtar_common/templates/blocks/bs_form_snippet.html b/ishtar_common/templates/blocks/bs_form_snippet.html index 47779cdc1..74dbadf5c 100644 --- a/ishtar_common/templates/blocks/bs_form_snippet.html +++ b/ishtar_common/templates/blocks/bs_form_snippet.html @@ -63,13 +63,26 @@ {% if field.name in form.HEADERS %} {% if forloop.counter0 %} {% endif %} -

{{field.name|from_dict:form.HEADERS|call:'render'}}

+ +{% if form.current_header %} + {{form.current_header|call:'render_end'}} +{% endif %} + +{% with "headers,"|add:field.name as call_arg %} +{{form|call:call_arg|call:"render"}} +{% endwith %} +
{% elif not search and not forloop.counter0 or search and forloop.counter0 == 1 %}
{% endif %} {% include "blocks/bs_field_snippet.html" %} {% if forloop.last %} + +{% if form.current_header %} + {{form.current_header|call:'render_end'}} +{% endif %} + {% if search and forloop.counter0 >= 1 %}