{% load widget_tweaks %} {{ errors }} {% if errors and not fields %}
{% for field in hidden_fields %}{{ field }}{% endfor %}
{% endif %}
{% for field, errors in fields %}
{% if field.name == "name" or field.name == "timeslot" %} {% include "htmx/forms/input_field.html" with label=field.label max_width="md" field=field %} {% elif field.name == "active" %} {% include "htmx/forms/input_field.html" with label=field.label field=field input_classes="checkbox border-b border-1" %} {% else %}
{% if field.help_text %}
{{ field.help_text }}
{% endif %} {{ errors }} {% render_field field %}
{% endif %} {% if forloop.last %} {% for field in hidden_fields %}{{ field }}{% endfor %} {% endif %}
{% endfor %}
{% if not fields and not errors %} {% for field in hidden_fields %}{{ field }}{% endfor %} {% endif %}