{% extends 'admin/menu_left_admin.html.twig' %}

{% block title %}Editer utilisateur{% endblock %}

{% block main %}

    {% for flashMessage in app.session.flashbag.get('error') %}
        <div class="alert alert-danger">
            Erreur :  {{ flashMessage }}
        </div>
    {% endfor %}

    {% for flashMessage in app.session.flashbag.get('success') %}
        <div class="alert alert-success">
            Succès : {{ flashMessage }}
        </div>
    {% endfor %}

    <div id="profil-infos-perso" class="row plr-16 ptb-24">

        <div class="col-xs-12 col-sm-6 p-0">
            <div class="row m-0">

                <!-- BLOC MES INFORMATIONS -->
                <div class="col-xs-12 p-0">
                    <div class="bloc-base p-16">
                        <div class="bloc-title mb-16">
                            <h2 class="align-middle">Mes informations</h2>
                        </div>
                        <div class="row m-0">
                            <div class="col-xs-12 p-0 background-white">
                                <div class="bloc-base background-white p-48">
                                    {{ form_start(userForm) }}
                                        {{ form_row(userForm.nom) }}
                                        {{ form_row(userForm.prenom) }}
                                        {{ form_row(userForm.email) }}
                                        {{ form_row(userForm.telephone) }}
                                        {{ form_row(userForm.dateFinBan) }}
                                        {{ form_row(userForm.isAgent) }}
                                        {{ form_row(userForm.isAdmin) }}
                                        {{ form_row(userForm.isActif) }}
                                        {{ form_row(userForm.hasValidated) }}
                                        <button class="button-square mt-24">Enregistrer</button>
                                    {{ form_end(userForm) }}
                                </div>
                            </div>
                        </div>
                    </div>
                </div>

            </div>
        </div>
        <div class="col-xs-12 col-sm-6 p-0">
            <div class="row m-0">

                <!-- BLOC CHANGER MDP -->
                <div class="col-xs-12 p-0">
                    <div class="bloc-base p-16">
                        <div class="bloc-title mb-16">
                            <h2 class="align-middle">Mot de passe</h2>
                        </div>
                        <div class="row m-0">
                            <div class="col-xs-12 p-0">
                                <div class="bloc-action background-white p-0">
                                    <div class="bloc-base background-white p-48">
                                        {{ form_start(pwForm) }}
                                            {{ form_row(pwForm.password) }}
                                            <p class="help-block">Minimum 8 caractères, une majuscule, une minuscule et un chiffre.</p>
                                            <button class="button-square mt-24">Enregistrer</button>
                                        {{ form_end(pwForm) }}
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>

            </div>
        </div>

    </div>







{% endblock %}

{% block javascript_inline %}
    {{ parent() }}
    <script>
        $(".datepicker").datepicker({
            'language': 'fr'
        });
    </script>
{% endblock %}