{% extends "base.html" %}

{% block content %}
    <div id="login">
        <form class="form-horizontal" name="LoginForm" action="{% url 'login' %}" method="post">
        {% csrf_token %}
        <input type="hidden" name="next" value="{{ next }}">
        {% if form.non_field_errors %}
        {% for error in form.non_field_errors %}
        <p class="errornote">{{ error }}</p>
        {% endfor %}
        {% endif %}
        <div class="control-group">
            {{ form.username.label_tag }}
            <div class="controls">
                {{ form.username.errors }}{{ form.username }}
            </div>
        </div>
        <div class="control-group mt-3">
            {{ form.password.label_tag }}
            <div class="controls">
                {{ form.password.errors }}{{ form.password }}
            </div>
        </div>
        <div class="control-group mt-3">
            <div class="controls">
                <button type="submit" class="btn btn-primary">Se connecter</button>
            </div>
        </div>
        </form>
    </div>
{% endblock %}
