summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@iggdrasil.net>2017-11-30 17:47:18 +0100
committerÉtienne Loks <etienne.loks@iggdrasil.net>2017-11-30 17:47:18 +0100
commit2d344958c09b81ba8a804161efc78bdd0a6dbc8e (patch)
tree8bc179a6c7c46c91af7a886be30db2b8c90bba10
parent30198e4275f7d2f8d22468c36254a73db61dbe5b (diff)
downloadChimère - projet Saclay-2d344958c09b81ba8a804161efc78bdd0a6dbc8e.tar.bz2
Chimère - projet Saclay-2d344958c09b81ba8a804161efc78bdd0a6dbc8e.zip
Better display of property on edit form
-rw-r--r--templates/chimere/edit.html10
1 files 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 %}<div class='edit errorlist'>
<legend>{% trans "Error" %}</legend>
@@ -73,14 +73,16 @@
<p class="help">{{ form.end_date.help_text }}</p>
</div>
</div>{% endif %}
- {% for field in form %}{% for property in properties %}{% ifequal field.name property.getNamedId %}
<div class="row">
- <div class="col-xs-6">
+ {% for field in form %}{% if field.name|startswith:'property_' %}
+ {% for property in properties %}{% ifequal field.name property.getNamedId %}
+ <div class="col-xs-12 col-md-6 col-xl-4">
<label for="id_{{field.name}}">{% trans field.label %}{% if property.mandatory %} *{% endif %}</label>
{% if field.errors %}<div class='errors'>{{ field.errors }}</div>{% endif %}
{{ field }}
</div>
- </div>{% endifequal %}{% endfor %}{% endfor %}
+ {% endifequal %}{% endfor %}{% endif %}{% endfor %}
+ </div>
</div>
<div class='bottomform'>