{% extends base_template %} {% load i18n staticfiles bootstrap3 crud_tags %} {% block extrastyle %} {{ media }} {% endblock %} {% block content %}
{% csrf_token %} {% if popup %} {% endif %} {% if form_haserrors %} {% endif %} {% bootstrap_form form %} {% if formset %}

{{ formset.model|verbose_name_plural }}

{{ formset.management_form }} {% bootstrap_formset_errors formset %} {% for field in formset.forms.0 %} {% if not field.is_hidden %} {% if not field.name == 'DELETE' %} {% else %} {% endif %} {% endif %} {% endfor %} {% for form in formset %} {% if form.non_field_errors %} {% comment %} We set colspan to an arbitrarily large number that can cover most use cases. And when colspan value exceeds the number of columns in the table row, browser automatically normalizes it to the max columns as defined in thead. Thus we get a full row of error messages. {% endcomment %} {% endif %} {% for field in form %} {% if not field.is_hidden %} {% else %}
{% bootstrap_field field show_label=False %}
{% endif %} {% endfor %} {% endfor %}
{{ field.label }}{% trans "Remove" %}
{% bootstrap_form_errors form %}
{% bootstrap_field field show_label=False %}
{% endif %}
{% if formset %} {% endif %} {% endblock content %}