{% extends "admin/base_site.html" %}
{% load i18n static admin_modify %}

{% block branding %}
{% endblock %}
{#  <script type="text/javascript" src="{% static "js/i18n.js" %}"></script>#}
{#  {{ media }}#}
{% block title %}{% endblock %}

{% spaceless %}
{% block content %}
  <div>
    <form class="layui-form data-form" {% if has_file_field %}enctype="multipart/form-data" {% endif %}action="{{ form_url }}" method="post">
      {% block form_top %}{% endblock %}
      <div>
        {% block head_note %} {% endblock %}
        {% if is_popup %}<input type="hidden" name="_popup" value="1"/>{% endif %}
        {% if save_on_top %}{% submit_row %}{% endif %}
        {% if errors %}
            <p class="errornote">
            {% blocktrans count errors.items|length as counter %}Please correct the error below.{% plural %}Please correct the errors below.{% endblocktrans %}
            </p>
            <ul class="errorlist">{% for error in adminform.form.non_field_errors %}<li>{{ error }}</li>{% endfor %}</ul>
        {% endif %}

        {% autoescape off %}
        {% csrf_token %}
        {% endautoescape %}

        {% for fieldset in adminform %}
          {% include "includes/fieldset.html" %}
        {% endfor %}

{#        {% block after_field_sets %}{% endblock %}#}

        {% for inline_admin_formset in inline_admin_formsets %}
            {% include inline_admin_formset.opts.template %}
        {% endfor %}

        {% block after_related_objects %}{% endblock %}

{#        {% submit_row %}#}

{#        {% if add %}#}
{#           <script type="text/javascript">document.getElementById("{{ adminform.first_field.auto_id }}").focus();</script>#}
{#        {% endif %}#}

        {# JavaScript for prepopulated fields #}
        {#{% prepopulated_fields_js %}#}
      </div>
    </form>
  </div>
{% endblock %}
{% endspaceless %}
