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

{% block extrahead %}{{ block.super }}
<script type="text/javascript" src="{% url 'admin:jsi18n' %}"></script>
{{ media }}
{% endblock %}

{% block extrastyle %}{{ block.super }}<link rel="stylesheet" type="text/css" href="{% static "admin/css/forms.css" %}">{% endblock %}

{% block coltype %}colM{% endblock %}

{% block bodyclass %}{{ block.super }} app-{{ opts.app_label }} model-{{ opts.model_name }} change-form{% endblock %}

{% block breadcrumbs %}
<div class="breadcrumbs">
<a href="{% url 'admin:index' %}">{% translate 'Home' %}</a>
&rsaquo; <a href="{% url 'admin:app_list' app_label=opts.app_label %}">{{ opts.app_config.verbose_name }}</a>
&rsaquo; <a href="{% url opts|admin_urlname:'changelist' %}">{{ opts.verbose_name_plural|capfirst }}</a>
&rsaquo; {% translate 'Import from IMAP' %}
</div>
{% endblock %}

{% block content %}
<div id="content-main">
    <form method="post" id="import-imap-form">
        {% csrf_token %}
        <div>
            {% if form.errors %}
                <p class="errornote">
                    {% if form.errors|length == 1 %}
                        {% translate "Please correct the error below." %}
                    {% else %}
                        {% translate "Please correct the errors below." %}
                    {% endif %}
                </p>
            {% endif %}

            <fieldset class="module aligned">
                {% for field in form %}
                    <div class="form-row">
                        {{ field.errors }}
                        {{ field.label_tag }}
                        {{ field }}
                        {% if field.help_text %}
                            <div class="help">{{ field.help_text|safe }}</div>
                        {% endif %}
                    </div>
                {% endfor %}
            </fieldset>

            <div class="submit-row">
                <input type="submit" value="{% translate 'Start Import' %}" class="default" />
            </div>
        </div>
    </form>
</div>
{% endblock %}
