{% load wger_extras %} {% load i18n %}

{{exercise}}

{{ formset.management_form }} {% for field in formset %}
{# Header row with field labels, only for first loop #}
{% for i in field %} {% if not i.is_hidden %} {% if forloop.first %}
{% endif %} {% if forloop.parentloop.first %}
{{ i.label }}
{% endif %} {% endif %} {% endfor %}
{# Form field rows #}
{% for i in field %} {% if forloop.first %}
{{ forloop.parentloop.counter }})
{% endif %} {% if not i.is_hidden %}
{% endif %} {# Field elements #} {% if i|is_checkbox %} {{ i|form_field_add_css:'checkbox' }} {% else %} {{i|form_field_add_css:'form-control'}} {% endif %} {% if not i.is_hidden %}
{% endif %} {% endfor %}
{% endfor %}