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

{% block content %}<div id="content-main">
    <form method="post" id="{{ opts.model_name }}_form" novalidate>
        {% csrf_token %}{% block form_top %}{% endblock %}
        <div>
            {% if errors %}
            <p class="errornote">
                {% if errors|length == 1 %}{% translate "Please correct the error below." %}{% else %}{% translate "Please correct the errors below." %}{% endif %}
            </p>
            {{ form.non_field_errors }}
            {% endif %}

            {% include "admin/includes/fieldset.html" %}

            {% block submit_buttons_bottom %}
            <input type="submit" value="{% translate 'Create' %}" class="default" name="_save">
            <a href="{% url opts|admin_urlname:'changelist' %}" class="closelink">{% translate 'Close' %}</a>
            {% endblock %}

            {% block admin_change_form_document_ready %}
            <script id="django-admin-form-add-constants" src="{% static 'admin/js/change_form.js' %}"
                {% if adminform and add %} data-model-name="{{ opts.model_name }}" {% endif %} async>
                </script>
            {% endblock %}

            {# JavaScript for prepopulated fields #}
            {% prepopulated_fields_js %}

        </div>
    </form>
</div>
{% endblock %}