{% extends "iconolab_base.html" %}

{% block content %}

{% if form.errors %}
<p>Combinaison identifiant/mot de passe incorrecte. Veuillez réessayer.</p>
{% endif %}

<div class='col-md-6 center centerer'>
    <h3>Se connecter</h3>
    <form class="form" action="{% url 'account:login' %}" method="POST">
      {% csrf_token %}
      {% for field in form %}
      <fieldset class="form-group">
        <label class="control-label" for="id_{{ field.name }}">{{ field.label }}</label>
        <input type="{% if field.name == "username" %}text{% else %}password{% endif %}" class="form-control"
          name="{{ field.name }}"
          id="id_{{ field.name }}" > 
        {% if field.errors %}{{ field.errors }}{% endif %}
      </fieldset>
      {% endfor %}
      <input type="hidden" name="next" value="{{next}}">
      <input type="submit" value="S'identifier"  class="btn btn-primary">
    </form>
</div>

{% endblock %}