From 2d344958c09b81ba8a804161efc78bdd0a6dbc8e Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Thu, 30 Nov 2017 17:47:18 +0100 Subject: Better display of property on edit form --- templates/chimere/edit.html | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/templates/chimere/edit.html b/templates/chimere/edit.html index ddd6888..129097f 100644 --- a/templates/chimere/edit.html +++ b/templates/chimere/edit.html @@ -1,4 +1,4 @@ -{% load i18n chimere_tags inline_formset staticfiles bootstrap %} +{% load i18n chimere_tags inline_formset staticfiles bootstrap startswith %} {% if submited %}{% submited %}{% endif %} {% if error_message %}
{% trans "Error" %} @@ -73,14 +73,16 @@

{{ form.end_date.help_text }}

{% endif %} - {% for field in form %}{% for property in properties %}{% ifequal field.name property.getNamedId %}
-
+ {% for field in form %}{% if field.name|startswith:'property_' %} + {% for property in properties %}{% ifequal field.name property.getNamedId %} +
{% if field.errors %}
{{ field.errors }}
{% endif %} {{ field }}
-
{% endifequal %}{% endfor %}{% endfor %} + {% endifequal %}{% endfor %}{% endif %}{% endfor %} +
-- cgit v1.2.3