{% extends "iconolab_base.html" %}

{% block content %}

{% if form.errors %}
<p>Your username and password didn't match. Please try again.</p>
{% endif %}

{% if next %}
    {% if user.is_authenticated %}
    <p>Your account doesn't have access to this page. To proceed,
    please login with an account that has access.</p>
    {% else %}
    <p>Please login to see this page.</p>
    {% endif %}
{% endif %}

<div class='col-md-6 center centerer'>
    <h3>Se connecter</h3>
    <form method="post" action="{% url 'account:login' %}">
    {% csrf_token %}
      
      <div class="form-group">
        <label for="exampleInputEmail1">{{form.username.label_tag}}</label>
        <input type="text" class="form-control" id="username" placeholder="Login ou utilisateur">
      </div>

      <div class="form-group">
        <label for="exampleInputPassword1">{{form.password.label_tag}}</label>
        <input type="password" class="form-control" id="exampleInputPassword1" placeholder="Password">
      </div>

      <input type="hidden" name="next" value="{{ next }}" />
      <button type="submit" class="btn btn-default">Submit</button>
      <p><a href="{% url 'account:password_reset' %}">Lost password?</a></p>

    </form>

</div>

{% endblock %}