{% extends "base.html" %} {% load static erp_tags %} {% block title %}{{ page_title }}{% endblock %} {% block content %}
{% csrf_token %} {% if next %}{% endif %} {# Form sections #} {% for section in form_sections %}
{{ section.title }}
{% if section.collapsible %} {% endif %}
{% for field_name in section.fields %} {% with field=form|get_form_field:field_name %} {% if field %}
{% if field.field.widget.input_type == "select" or field.field.widget.template_name == "django/forms/widgets/select.html" %} {{ field|add_class:"form-control form-control-sm" }} {% elif field.field.widget.input_type == "checkbox" %}
{{ field }}
{% elif field.field.widget.template_name == "django/forms/widgets/textarea.html" %} {{ field|add_class:"form-control form-control-sm" }} {% else %} {{ field|add_class:"form-control form-control-sm" }} {% endif %} {% if field.errors %}
{{ field.errors.0 }}
{% endif %} {% if field.help_text %} {{ field.help_text }} {% endif %}
{% endif %} {% endwith %} {% endfor %}
{% endfor %} {% if form.definition_sections or form.hidden_definitions %} {% include "erp/_definition_fieldsets.html" with wrap_cards=True %} {% endif %} {# Show any fields not in sections #} {% if form.non_field_errors %}
{% for error in form.non_field_errors %}

{{ error }}

{% endfor %}
{% endif %} {# Action Bar #}
Cancel
{% endblock %} {% block javascripts %} {% if party_search %}{% include "erp/_party_search_js.html" %}{% endif %} {% endblock %}