{% load static %}
{% load tags %}

<div class="fields">
    {% for field in fields %}
        <div class="mb-3 active{% if field.errors %} erroneous{% endif %}">
            <div class="info">
                <label for="id_{{ field.name }}" class="form-label">{{ field.label|format_text }}</label>
                <p class="help-text">{{field.help_text}}</p>
                {% if field.errors %}
                    <ul class="error-list">
                        {% for error in field.errors %}
                        <li>{{ error|escape }}</li>
                        {% endfor %}
                    </ul>
                {% endif %}
            </div>
            <div class="field-container {% if protected %}disabled{% endif %}">
                {{ field | set_cypress_ref }}
            </div>
        </div>
    {% endfor %}
</div>
