{% 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 }} {% if not i.field.required %}
{% trans "Optional" %} {% endif %}
{% 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 %} {% for error in i.errors %}

{% trans error %}

{% endfor %} {% if not i.is_hidden %}
{% endif %} {% endfor %}
{% endfor %}