{% extends 'up_squelette.html' %}

{% block main %}

<!--<div class="page-header">
<h1>Profil</h1>
</div>-->

<div class="row">

        <div class="col-sm-3"></div>
        <div class="col-sm-6">


            <div class="panel panel-primary">
            <div class="panel-heading">
              <h3 class="panel-title"> Changer mon mot de passe </h3>
            </div>

            <div class="panel-body">
                  <form method="POST" action="" enctype="multipart/form-data">

                     <p> Votre Adresse e-mail sur ce serveur : {{ address }} </p>

                     <label> Mot de passe </label>
                     <input type="password" name="password" id="password" placeholder="Votre mot de passe" class="form-control"><br />
                     <input type="password" name="passwd_confirm" id="passwd_confirm" placeholder="Confirmation du mot de passe" class="form-control"><br />
                 <button id="tada" class="btn btn-default btn-primary" type="submit">Envoyer</button>
                 </form>

                 {# on affiche les messages d'erreur puis les messages de succes #}
                 {% for categorie in ['error', 'succes'] %}
                   {% with msgs = get_flashed_messages(category_filter=[categorie]) %}
                     {% if msgs %}
                       <div class="flashed {{ categorie }}">
                         {% for m in msgs %}
                           <p>{{ m|safe }}</p>
                         {% endfor %}
                       </div>
                     {% endif %}
                   {% endwith %}
                 {% endfor %}

              </div>
          </div>
        </div>
</div>

{% endblock %}