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

{% block title %} Modifier le profil{% endblock title %}

{% block profil_content %}
<div class="row">
    <div class="col-lg-12"><br/>
        <h3><i class="bi bi-pen-fill"></i> Modifier le profil</h3><hr/>
    </div>
</div>
<div class="row col-lg-10">
    <div class="row">
        <div class="col-lg-12"><br/>
            <center>{% include 'main_app/message.html' %}</center><br/>
            <form action="#" method="post" class="checkout-form " {% if hide_form %}hidden{% endif %}>
                    {% csrf_token %}

                <table class="table profil-cmd">
                    <thead>
                        <tr>
                            <th colspan="2">INFORMATIONS PERSONNELLES</th>
                        </tr>
                    </thead>
                    <tbody>
                        <tr>
                            <td>No. Inscription</td>
                            <td>
                                {% render_field form.nce class+="form-control"  %}
                                <span style="color:red;">{{ form.nce.errors }}</span>
                            </td>
                        </tr>
                        <tr>
                            <td>Nom</td>
                            <td>
                                {% render_field form.nom class+="form-control"  %}
                                <span style="color:red;">{{ form.nom.errors }}</span>
                            </td>
                        </tr>
                        <tr>
                            <td>Prénoms</td>
                            <td>
                                {% render_field form.prenoms class+="form-control"  %}
                                <span style="color:red;">{{ form.prenoms.errors }}</span>
                            </td>
                        </tr>
                        <tr>
                            <td>Sexe</td>
                            <td>
                                {% render_field form.sexe class+="form-control"  %}
                                <span style="color:red;">{{ form.sexe.errors }}</span>
                            </td>
                        </tr>
                        <tr>
                            <td>Date de naissance</td>
                            <td>
                                {% render_field form.datenaiss class+="form-control"  %}
                                <span style="color:red;">{{ form.datenaiss.errors }}</span>
                            </td>
                        </tr>
                        <tr>
                            <td>Lieu de naissance</td>
                            <td>
                                {% render_field form.lieunaiss class+="form-control"  %}
                                <span style="color:red;">{{ form.lieunaiss.errors }}</span>
                            </td>
                        </tr>
                        <tr>
                            <td>Contact</td>
                            <td>
                                {% render_field form.phone class+="form-control"  %}
                                <span style="color:red;">{{ form.phone.errors }}</span>
                            </td>
                        </tr>
                        <tr>
                            <td>Email</td>
                            <td>
                                {% render_field form.email class+="form-control"  %}
                                <span style="color:red;">{{ form.email.errors }}</span>
                            </td>
                        </tr>

                    </tbody>
                </table>
                <br/>
                <!-- INFO TUTEUR -->
                <table class="table profil-cmd">
                    <thead>
                        <tr>
                            <th colspan="2">IINFORMATIONS PARENTS/TUTEUR</th>
                        </tr>
                    </thead>
                    <tbody>
                        <tr>
                            <td style="width:170px;">Nom du père </td>
                            <td>
                                {% render_field form.nom_pere class+="form-control"  %}
                                <span style="color:red;">{{ form.nom_pere.errors }}</span>
                            </td>
                        </tr>
                        <tr>
                            <td>Nom de la mère</td>
                            <td>
                                {% render_field form.nom_mere class+="form-control"  %}
                                <span style="color:red;">{{ form.nom_mere.errors }}</span>
                            </td>
                        </tr>
                        <tr>
                            <td>Contact du père</td>
                            <td>
                                {% render_field form.contact_pere class+="form-control"  %}
                                <span style="color:red;">{{ form.contact_pere.errors }}</span>
                            </td>
                        </tr>
                        <tr>
                            <td>Contact de la mère</td>
                            <td>
                                {% render_field form.contact_mere class+="form-control"  %}
                                <span style="color:red;">{{ form.contact_mere.errors }}</span>
                            </td>
                        </tr>
                        <tr>
                            <td>Contact téléphonique en cas d'urgence</td>
                            <td>
                                {% render_field form.contact_urgence class+="form-control"  %}
                                <span style="color:red;">{{ form.contact_urgence.errors }}</span>
                            </td>
                        </tr>
                        <tr>
                            <td>Lieu de résidence de la personne à contacter</td>
                            <td>
                                {% render_field form.habitation_contact_urgence class+="form-control"  %}
                                <span style="color:red;">{{ form.habitation_contact_urgence.errors }}</span>
                            </td>
                        </tr>

                    </tbody>
                </table>
                <br/>

                <table class="table profil-cmd">
                    <thead>
                        <tr>
                            <th colspan="2">INFORMATIONS RELATIVES AU BAC</th>
                        </tr>
                    </thead>
                    <tbody>
                        <tr>
                            <td style="width:170px;">Année d'obtension (BAC) </td>
                            <td>
                                {% render_field form.annee_bac class+="form-control"  %}
                                <span style="color:red;">{{ form.annee_bac.errors }}</span>
                            </td>
                        </tr>
                        <tr>
                            <td>Matricule</td>
                            <td>
                                {% render_field form.matricule class+="form-control"  %}
                                <span style="color:red;">{{ form.matricule.errors }}</span>
                            </td>
                        </tr>
                        <tr>
                            <td>Numéro de table (BAC)</td>
                            <td>
                                {% render_field form.numero_bac class+="form-control"  %}
                                <span style="color:red;">{{ form.numero_bac.errors }}</span>
                            </td>
                        </tr>
                        <tr>
                            <td>Série du BAC</td>
                            <td>
                                {% render_field form.serie_bac class+="form-control"  %}
                                <span style="color:red;">{{ form.serie_bac.errors }}</span>
                            </td>
                        </tr>
                        <tr>
                            <td>Mention du BAC</td>
                            <td>
                                {% render_field form.mention_bac class+="form-control"  %}
                                <span style="color:red;">{{ form.mention_bac.errors }}</span>
                            </td>
                        </tr>
                        <tr>
                            <td>Centre d'obtension du BAC</td>
                            <td>
                                {% render_field form.centre_compo_bac class+="form-control"  %}
                                <span style="color:red;">{{ form.centre_compo_bac.errors }}</span>
                            </td>
                        </tr>
                        <tr>
                            <td>Etablissement fréquentée</td>
                            <td>
                                {% render_field form.etablissement_bac class+="form-control"  %}
                                <span style="color:red;">{{ form.etablissement_bac.errors }}</span>
                            </td>
                        </tr>
                        <tr>
                            <td>Type de l'établissement fréquentée</td>
                            <td>
                                {% render_field form.type_etablissement class+="form-control"  %}
                                <span style="color:red;">{{ form.type_etablissement.errors }}</span>
                            </td>
                        </tr>


                    </tbody>
                </table>

                 <div class="form-group">
                    <div class="col-lg-offset-2 col-lg-10">
                     <center> <button type="submit" class="btn btn-success"><i class="bi bi-sd-card-fill"></i> Enregistrer</button></center>
                    </div>
                  </div>

                </form><br/><br/>
            <br/>
        </div>
    </div>
</div>
{% endblock profil_content %}