{% extends "djadmin/base_action.html" %}

{% block action_content %}
  <form method="post" enctype="multipart/form-data">
    {% csrf_token %}

    {% if form.errors %}<div class="form-errors">{{ form.non_field_errors }}</div>{% endif %}

    {% for field in form %}
      <div class="form-field">
        {{ field.label_tag }}
        {{ field }}
        {% if field.errors %}<div class="field-errors">{{ field.errors }}</div>{% endif %}
        {% if field.help_text %}<div class="field-help">{{ field.help_text }}</div>{% endif %}
      </div>
    {% endfor %}

    {% block action_buttons %}
      <button type="submit" class="button-primary">Save {{ opts.verbose_name }}</button>
    {% endblock %}
  </form>
{% endblock %}
