{% extends 'profil/profil_base.html' %}
{% load static %}
{% load widget_tweaks %}
{% load custom_tag %}

{% block profil_content %}
<div class="row">
    <div class="col-lg-12"><br/>
        <h3><i class="bi bi-mortarboard-fill"></i> Modifier le mot de passe</h3><hr/>
    </div>
</div>
<div class="row col-lg-11">
    <center>{% include 'parts/message.html' %}</center><br/>
    <form method="post" action="#">
        {% csrf_token %}
    <table class="table profil-cmd">
        <thead>
            <tr>
                <th colspan="2">MODIFIER LE MOT DE PASSE</th>
            </tr>
        </thead>
        <tbody>
            <tr>
                <td style="width:80px;">Ancien </td>
                <td>
                    {% render_field form.old_password class+="form-control" placeholder="Entrez votre ancien mot de passe" %}
                    <span style="color:red;">{{ form.old_password.errors }}</span>
                </td>
            </tr>
            <tr>
                <td>Nouveau</td>
                <td>
                    {% render_field form.new_password1 class+="form-control" placeholder="Entrez votre nouveau mot de passe" %}
                    <span style="color:red;">{{ form.new_password1.errors }}</span>
                </td>
            </tr>
            <tr>
                <td>Confirmer</td>
                <td>
                    {% render_field form.new_password2 class+="form-control" placeholder="Entrez à nouveau votre nouveau mot de passe" %}
                    <span style="color:red;">{{ form.new_password2.errors }}</span>
                </td>
            </tr>
            <tr>
                <td colspan="2" style="text-align:center;"><button type="submit" class='btn btn-primary'><i class="bi bi-sd-card-fill"></i> Enregistrer</button></td>
            </tr>
        </tbody>
    </table>
    </form>
    <p style="color:red;"><i>* Doit contenir au mmoins 8 caractères</i></p>
    <p style="color:red;"><i>* Ne doit pas contenir de '/'</i></p>
        <br/><br/>
</div>
{% endblock profil_content %}