{% extends "base.html" %}
{% load i18n %}

{% block subtitle %}
    {% trans 'Import' %}
{% endblock subtitle %}

{% block actions %}
    <a class="btn btn-default" href="{{ view.get_back_url }}">{% trans 'Back' %}</a>
{% endblock %}

{% block main %}
    <form action="" method="post" enctype="multipart/form-data" >{% csrf_token %}
        <table class="table table-bordered table-hover">
            {% include 'extras/form.html' with form=form %}
        </table>
        <div class="row">
            <div class="col-md-12">
                <input class="btn btn-primary" type="submit" value="{% trans 'Import' %}" />
            </div>
        </div>
    </form>
    <div class="progress hidden">
        <div class="progress-bar progress-bar-striped active" role="progressbar" aria-valuenow="100" aria-valuemin="0" aria-valuemax="100" style="width: 100%">
            <span>{% trans 'Import ...' %}</span>
        </div>
    </div>
{% endblock main %}

{% block extra_js %}
<script>
    (function($) {
        $(function() {
            $('form :submit').click(function() {
                $('form').addClass('hidden');
                $('.progress').removeClass('hidden');
            });
        });
    })(jQuery);
</script>
{% endblock %}
