{% extends "wagtailadmin/base.html" %}
{% load i18n wagtailadmin_tags %}
{% block titletag %}{% trans "Redirects" %}{% endblock %}

{% block content %}
    {% trans "Import redirects" as header_title %}
    {% include "wagtailadmin/shared/header.html" with title=header_title icon="redirect" %}

    <div class="nice-padding">
        <div class="help-block help-info">
            {% icon name='help' %}
            {% blocktrans trimmed %}
                <p>Select a file where redirects are separated into rows and contains the columns representing <code>from</code> and <code>to</code> (they can be named anything).</p>
                <p>After submitting you will be taken to a confirmation view where you can customize your redirects before import.</p>
            {% endblocktrans %}
        </div>
    </div>

    {% include "wagtailadmin/shared/non_field_errors.html" %}

    <form action="" method="POST" class="nice-padding" novalidate enctype="multipart/form-data">
        {% csrf_token %}

        <ul class="fields">
            {% for field in form.visible_fields %}
                <li>{% formattedfield field %}</li>
            {% endfor %}

            <li>
                <input type="submit" value="{% trans 'Import' %}" class="button" />
            </li>
        </ul>
    </form>
{% endblock %}
