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

<div class="main-content">
    <section class="section">
        {% block entete %}
        <div class="col-12 col-md-12 col-lg-12 upper-case">
            <div class="card">
                <div class="card-header">
                    <div class="col-12 col-md-12 col-lg-4">
                        <div class="card author-box">
                            <div class="card-body">
                                <div class="author-box-center">
                                    <img alt="image" src="/media/{{user.profile_pic}}" class="rounded-circle author-box-picture">
                                    <div class="clearfix"></div>
                                    <div class="author-box-name">
                                        {{user.first_name}} {{user.last_name}}
                                    </div>
                                    <div class="author-box-job"><a href="/utilisateur/profile-photo/upload" class="edit-avatar" type="button"><i class="fa fa-pencil">Photo de Profil</i></a></div>
                                </div>
                                <div class="text-center">
                                    <div class="author-box-description">

                                    </div>
                                    <div class="mb-2 mt-3">
                                        <div class="text-small font-weight-bold"></div>
                                    </div>
                                    <a href="#" class="btn btn-social-icon mr-1 btn-facebook">
                                        <i class="fab fa-facebook-f"></i>
                                    </a>
                                    <a href="#" class="btn btn-social-icon mr-1 btn-twitter">
                                        <i class="fab fa-twitter"></i>
                                    </a>
                                    <a href="#" class="btn btn-social-icon mr-1 btn-github">
                                        <i class="fab fa-github"></i>
                                    </a>
                                    <a href="#" class="btn btn-social-icon mr-1 btn-instagram">
                                        <i class="fab fa-instagram"></i>
                                    </a>
                                    <div class="w-100 d-sm-none"></div>
                                </div>
                            </div>
                        </div>
                        <div class="card">
                            <div class="card-header">
                                <h4>Details</h4>
                            </div>
                            <div class="card-body">
                                <div class="py-4">
                                    <p class="clearfix">
                        <span class="float-left">
                          Rôle
                        </span>
                                        <span class="float-right text-muted">
                          {{user.role}}
                        </span>
                                    </p>
                                    <p class="clearfix">
                        <span class="float-left">
                          N° Interphone:
                        </span>
                                        <span class="float-right text-muted">
                          {{user.numero_combine}}
                        </span>
                                    </p>
                                    <p class="clearfix">
                        <span class="float-left">
                          E-Mail
                        </span>
                                        <span class="float-right text-muted">
                          {{user.email}}
                        </span>
                                    </p>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="col-12 col-md-12 col-lg-8">
                        <div class="card">
                            <div class="padding-20">
                                <ul class="nav nav-tabs" id="myTab2" role="tablist">
                                    <li class="nav-item">
                                        <a class="nav-link active" id="home-tab2" data-toggle="tab" href="#about" role="tab"
                                           aria-selected="true">Changer Mot de Passe</a>
                                    </li>
                                    <li class="nav-item">
                                        <a class="nav-link" id="profile-tab2" data-toggle="tab" href="#settings" role="tab"
                                           aria-selected="false">Information du Profil</a>
                                    </li>
                                </ul>
                                <div class="tab-content tab-bordered" id="myTab3Content">
                                    <div class="tab-pane fade show active" id="about" role="tabpanel" aria-labelledby="home-tab2">
                                        <div class="row">

                                        </div>
                                        <h5 class="card-title">Changer votre mot de passe</h5>
                                        <p class="card-text">
                                            si vous avez oublié votre mot de passe merci de contacter la DSI
                                        </p>
                                        <a href="/change-password/" class="btn btn-primary">Changer votre mot de passe</a>
                                    </div>
                                    <div class="tab-pane fade upper-case" id="settings" role="tabpanel" aria-labelledby="profile-tab2">
                                        <form method="post" class="needs-validation">
                                            <div class="card-header">
                                                <h4>Votre Profil</h4>
                                            </div>
                                            <div class="card-body">
                                                <div class="row">
                                                    <div class="form-group col-md-6 col-12">
                                                        <label>Prénom</label>
                                                        <input type="text" class="form-control" value="{{user.first_name}}" readonly>
                                                    </div>
                                                    <div class="form-group col-md-6 col-12">
                                                        <label>Nom</label>
                                                        <input type="text" class="form-control" value="{{user.last_name}}" readonly>
                                                    </div>
                                                </div>
                                                <div class="row">
                                                    <div class="form-group col-md-7 col-12">
                                                        <label>Email</label>
                                                        <input type="email" class="form-control" value="{{user.email}}" readonly>
                                                    </div>
                                                    <div class="form-group col-md-5 col-12">
                                                        <label>Téléphone</label>
                                                        <input type="tel" class="form-control" value="{{user.numero_combine}}" readonly>
                                                    </div>
                                                </div>
                                                <div class="row">
                                                    <div class="form-group col-12">
                                                        <label>Rôle</label>
                                                        <input type="text" class="form-control" value="{{user.role}}" readonly>
                                                    </div>
                                                </div>
                                            </div>
                                        </form>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        {% endblock %}
        {% block chart %}

        {% endblock %}
        {% block tache %}

        {% endblock %}
        {% block ticket %}

        {% endblock %}
    </section>
</div>
{% endblock %}