{% extends base_template %} {% comment %} This file acts as a base for all forms It automatically handles fields, help text, errors, and more {% endcomment %} {% block resources %} {% load static %} {{ form.media }} {% endblock %} {% block containerClass %}container{% endblock %} {% block pageHeader %}{{ formName }}{% endblock %} {% block belowHeader %}
{{ non_field_help_text }}
{% endblock %} {% block mainContent %} {% load form_tags %}
{% if hide_back is not True %} {% endif %}
{% csrf_token %} {% for field in form %}
{% if render_no_floating %} {% if field|is_checkbox %}
{{ field|setup_checkbox }}
{% else %} {{ field|setup_field:False }} {% endif %} {% elif field in form.visible_fields %}
{{ field|setup_field:True }}
{% else %} {{ field|setup_field:"form-control" }} {% endif %} {% if field.help_text %}
{{ field.help_text }}
{% endif %} {% if field.errors %}
    {% for error in field.errors %}
  • {{ error }}
  • {% endfor %}
{% endif %}
{% endfor %} {% block beforeSubmit %} {# This block is used to put elements directly before the submit button #} {% endblock %}
{% endblock %}