{% if saved_pk %} {# Saved successfully — notify parent and close #}
Supplier saved. This window will close automatically.
{% else %}
Add supplier
{% csrf_token %} {% for field in form %}
{{ field.label }}{% if field.field.required %}
*
{% endif %}
{{ field }} {% if field.errors %}
{{ field.errors|join:", " }}
{% endif %}
{% endfor %} {% if form.non_field_errors %}
{{ form.non_field_errors }}
{% endif %}
Save supplier
Cancel
{% endif %}