<!DOCTYPE html>
<html lang="fr">

<!-- Head -->
<head>
    {% include 'head.html' %}
</head>
<!-- End of Head -->

<body id="page-top">

<!-- Page Wrapper -->
<div id="wrapper">

    <!-- Sidebar -->
    {% include 'sidebar.html' %}
    <!-- End of Sidebar -->

    <!-- Content Wrapper -->
    <div id="content-wrapper" class="d-flex flex-column">

        <!-- Main Content -->
        <div id="content">

            <!-- Topbar -->
            <nav class="navbar navbar-expand navbar-light bg-white topbar mb-4 static-top shadow">
                {% include 'topbar.html' %}
            </nav>
            <!-- End of Topbar -->

            <!-- Begin Page Content -->
            <div class="container-fluid">
                {% with messages = get_flashed_messages(with_categories=true) %}
                {% if messages %}
                {% for category, message in messages %}
                <div class="card bg-{{ category }} text-white shadow">
                    <div class="card-body">
                        {{ message }}
                    </div>
                </div>
                {% endfor %}
                {% endif %}
                {% endwith %}

                <h1>Suppression utilisateur</h1>
                <div class="card shadow mb-4">
                    <div class="card-header py-3">
                        <h6 class="m-0 font-weight-bold text-primary">Liste de tous les patients</h6>
                    </div>
                    <div class="card-body">
                        <div class="table-responsive">
                            <table class="table table-bordered" id="dataTable" width="100%" cellspacing="0">
                                <thead>
                                <tr>
                                    <th>ID</th>
                                    <th>Nom</th>
                                    <th>Prénom</th>
                                    <th>Téléphone</th>
                                </tr>
                                </thead>
                                <tbody>
                                {% for list in accounts %}
                                <tr>
                                    <td>{{ list[0] }}</td>
                                    <td>{{ list[1] }}</td>
                                    <td>{{ list[2] }}</td>
                                    <td>{{ list[3] }}</td>
                                </tr>
                                {% endfor %}
                                </tbody>
                            </table>
                        </div>
                    </div>
                </div>

                <!-- Forms -->
                <form method="post" action="user_deletebdd" class="user">
                    <div class="form-group row">
                        <label class="col-sm-2 col-form-label text-center">Confirmation suppresion utilisateur</label>
                        <div class="col">
                            <input name="prenom" type="text" class="form-control" placeholder="Prénom">
                        </div>
                        <div class="col">
                            <input name="nom" type="text" class="form-control" placeholder="Nom de famille">
                        </div>
                        <div class="col">
                            <button type="submit" class="btn btn-primary">Confirmer</button>
                        </div>
                    </div>
                    <div class="form-group row">
                        <label class="col-sm-2 col-form-label text-center">Rank de l'utilisateur</label>
                        <div class="col-sm-2 col-form-label">
                            <select name="id" class="form-control" id="exampleFormControlSelect1">
                                {% for list in accounts %}
                                <option>{{ list[0] }}</option>
                                {% endfor %}
                            </select>
                        </div>
                    </div>
                </form>

            </div>
            <!-- /.container-fluid -->

        </div>
        <!-- End of Main Content -->

        <!-- Footer -->
        {% include 'footer.html' %}
        <!-- End of Footer -->

    </div>
    <!-- End of Content Wrapper -->

</div>
<!-- End of Page Wrapper -->

<!-- Scroll to Top Button-->
<a class="scroll-to-top rounded" href="#page-top">
    <i class="fas fa-angle-up"></i>
</a>

<!-- Logout Modal-->
<div class="modal fade" id="logoutModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel"
     aria-hidden="true">
    {% include 'auth/logout_modal.html' %}
</div>

</body>

</html>
