{% extends 'base.html' %}
{% load crispy_forms_tags %}


{% block title %}{{ user.username }} - Changer de mot de passe{% endblock title %}

{% block head %}
{{ password_form.media }}
{% endblock head %}

{% block content %}
<div class="row">
    {% include 'user_app/nav.html' %}
    <div class="col">
        <h2>Changement de mot de passe</h2>
        {% if not user.has_usable_password %}
        <div class="alert alert-warning alert-dismissible fade show" role="alert">
            Vous n'avez pas encore défini de mot de passe.
            <button type="button" class="close" data-dismiss="alert" aria-label="Close">
                <span aria-hidden="true">&times;</span>
            </button>
        </div>
        {% endif %}
        <form method="POST">
            {% csrf_token %}
            {{ password_form|crispy }}
            <input type="submit" value="Enregistrer" class="btn btn-primary">
            <input type="reset" value="Annuler" class="btn btn-secondary">
        </form>
    </div>
</div>
{% endblock content %}
