gestioCOF/bda/templates/inscription-formset.html

42 lines
1.5 KiB
HTML
Raw Normal View History

2016-07-14 19:29:15 +02:00
{% load bootstrap %}
2012-07-11 17:39:20 +02:00
{{ formset.non_form_errors.as_ul }}
2016-07-14 19:29:15 +02:00
<table id="bda_formset" class="form table">
2012-07-11 17:39:20 +02:00
{{ formset.management_form }}
{% for form in formset.forms %}
{% if forloop.first %}
<thead><tr>
{% for field in form.visible_fields %}
{% if field.name != "DELETE" and field.name != "priority" %}
<th class="bda-field-{{ field.name }}">{{ field.label|safe|capfirst }}</th>
{% endif %}
{% endfor %}
2015-09-13 18:23:47 +02:00
<th><sup>1</sup></th>
2012-07-11 17:39:20 +02:00
</tr></thead>
<tbody class="bda_formset_content">
{% endif %}
<tr class="{% cycle row1,row2 %} dynamic-form {% if form.instance.pk %}has_original{% endif %}">
{% for field in form.visible_fields %}
{% if field.name != "DELETE" and field.name != "priority" %}
<td class="bda-field-{{ field.name }}">
{% if forloop.first %}
{{ form.non_field_errors }}
{% for hidden in form.hidden_fields %}{{ hidden }}{% endfor %}
{% endif %}
{{ field.errors.as_ul }}
2016-07-14 19:29:15 +02:00
{{ field | bootstrap }}
2012-07-11 17:39:20 +02:00
</td>
{% endif %}
{% endfor %}
<td class="tools-cell"><div class="tools">
2016-07-27 14:00:38 +02:00
<a href="javascript://" class="glyphicon glyphicon-sort drag-btn" title="Déplacer"></a>
2012-07-11 17:39:20 +02:00
<input type="checkbox" name="{{ form.DELETE.html_name }}" style="display: none;" />
<input type="hidden" name="{{ form.priority.html_name }}" style="{{ form.priority.value }}" />
2016-07-14 19:29:15 +02:00
<a href="javascript://" class="glyphicon glyphicon-remove remove-btn" title="Supprimer"></a>
2012-07-11 17:39:20 +02:00
</div>
<div class="spacer"></div>
</td>
</tr>
{% endfor %}
</tbody>
</table>