kpsul/gestioncof/templates/inscription-petit-cours-formset.html
Basile Clement 3314670cab Various fixes for Django 1.11
- The {% cycle %} command was used non-quoted arguments separated by
   commas, while it is supposed to use quoted arguments separated by
   spaces (I'm actually not sure how that ever worked :)

 - django-bootstrap-form was at version 3.2.1 which is not compatible
   with Django 1.11 (but also required by GestioCOF). I upgraded it to
   version 3.3.
2018-02-11 19:09:07 +01:00

40 lines
1.3 KiB
HTML

{% load bootstrap %}
{{ formset.non_form_errors.as_ul }}
<table id="bda_formset" class="form table">
{{ formset.management_form }}
{% for form in formset.forms %}
{% if forloop.first %}
<thead><tr>
{% for field in form.visible_fields %}
<th class="bda-field-{{ field.name }}">
{% if field.name != "DELETE" %}
{{ field.label|safe|capfirst }}
{% endif %}
<sup>{{ forloop.counter }}</sup>
</th>
{% endfor %}
</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 | bootstrap }}
</td>
{% endif %}
{% endfor %}
<td class="tools-cell"><div class="tools">
<input type="checkbox" name="{{ form.DELETE.html_name }}" style="display: none;" />
<a href="javascript://" class="glyphicon glyphicon-remove remove-btn" title="Supprimer"></a>
</div>
<div class="spacer"></div>
</td>
</tr>
{% endfor %}
</tbody>
</table>