{% extends 'enseignant/base_profile.html' %}
{% load static %}
{% load widget_tweaks %}
{% load unicorn %}
{% unicorn_scripts %}
{% block custom_css %}
<style>
        #loading {
            background: red;
            position: fixed;
            top: 0;
            width: 100%;
            height: 100%;
        }

    </style>
{% endblock custom_css %}
{% block page_title %}{{page_title}}{% endblock page_title %}
{% block content %}
<section class="content">
    <div class="container-fluid">
        <!-- Small boxes (Stat box)-->
        {% include "enseignant/parts/stats_seance.html" %}

    </div>
  </section>


<div class="card mb-3">
    <div class="card-header">
        <i class="fas fa-table"></i>
        MODIFIER LE PROFIL
    </div>
    <div class="card-body">
        <form action="#" method="post">
               {% csrf_token %}
                <div class="row">
                    <div class="col-md-3">
                        <div class="form-group">
                            <label>Nom (<span style="color:red;">*</span>)</label>
                            {% render_field form.nom class="form-control" placeholder="Votre nom" %}
                        </div>
                    </div>
                    <div class="col-md-5">
                        <div class="form-group">
                            <label>Prénoms (<span style="color:red;">*</span>)</label>
                            {% render_field form.prenoms class="form-control" placeholder="Vos prénoms" %}
                        </div>
                    </div>
                    <div class="col-md-1">
                        <div class="form-group">
                            <label>Sexe </label>
                            {% render_field form.sexe class="form-control" placeholder="Sexe" %}
                        </div>
                    </div>
                    <div class="col-md-3">
                        <div class="form-group">
                            <label>Civilité (<span style="color:red;">*</span>)</label>
                            {% render_field form.civilite class="form-control" placeholder="Civilité" %}
                        </div>
                    </div>
                </div>

                <div class="row">
                    <div class="col-md-2">
                        <div class="form-group">
                            <label>Date de Naissance</label>
                            {% render_field form.datenaiss class="form-control" type="date" placeholder="Votre nom" %}
                        </div>
                    </div>
                    <div class="col-md-3">
                        <div class="form-group">
                            <label>Lieu de naissance</label>
                            {% render_field form.lieunaiss class="form-control" placeholder="Lieu de naissance" %}
                        </div>
                    </div>
                    <div class="col-md-2">
                        <div class="form-group">
                            <label>Téléphone (<span style="color:red;">*</span>)</label>
                            {% render_field form.phone class="form-control" placeholder="Téléphone" %}
                        </div>
                    </div>
                    <div class="col-md-3">
                        <div class="form-group">
                            <label>Email (<span style="color:red;">*</span>)</label>
                            {% render_field form.email class="form-control" placeholder="Email" %}
                        </div>
                    </div>
                    <div class="col-md-2">
                        <div class="form-group">
                            <label>Grade</label>
                            {% render_field form.grade class="form-control" placeholder="Grade" %}
                        </div>
                    </div>
                </div>
                <div class="row">
                   <div class="col-md-2">
                        <div class="form-group">
                            <label>Groupe Sanguin </label>
                            {% render_field form.groupe_sanguin class="form-control" placeholder="Groupe Sanguin" %}
                        </div>
                    </div>
                    <div class="col-md-3">
                        <div class="form-group">
                            <label>Nationalité</label>
                            {% render_field form.nationalite class="form-control" placeholder="Nationalité" %}
                        </div>
                    </div>
                    <div class="col-md-2">
                        <div class="form-group">
                            <label>Profession</label>
                            {% render_field form.profession class="form-control" placeholder="Profession" %}
                        </div>
                    </div>
                    <div class="col-md-3">
                        <div class="form-group">
                            <label>Spécialité</label>
                            {% render_field form.specialite class="form-control" placeholder="Spécialité" %}
                        </div>
                    </div>
                    <div class="col-md-2">
                        <div class="form-group">
                            <label>Nombre d'enfant</label>
                            {% render_field form.nb_enfant class="form-control" type="number" placeholder="Nombre d enfant" %}
                        </div>
                    </div>
                </div>

                <div class="row">
                   <div class="col-md-2">
                        <div class="form-group">
                            <label>Adresse </label>
                            {% render_field form.adresse class="form-control" placeholder="Adresse" %}
                        </div>
                    </div>
                    <div class="col-md-2">
                        <div class="form-group">
                            <label>Situation matri.</label>
                            {% render_field form.sit_matri class="form-control" placeholder="Situation matrimoniale" %}
                        </div>
                    </div>
                    <div class="col-md-4">
                        <div class="form-group">
                            <label>Fonction (<span style="color:red;">*</span>)</label>
                            {% render_field form.autre_profession class="form-control" placeholder="Fonction" %}
                        </div>
                    </div>
                    <div class="col-md-4">
                        <div class="form-group">
                            <label>Axe de recherche (<span style="color:red;">*</span>)</label>
                            {% render_field form.interet class="form-control" placeholder="Itérêt" %}
                        </div>
                    </div>

                    <div class="row">
                        <div class="col-md-6">
                            <div class="form-group">
                                <label>IVSTP(<span style="color:red;">*</span>)</label>
                                {% render_field form.ufr class="form-control" %}
                            </div>
                        </div>
                        <div class="col-md-6">
                            <div class="form-group">
                                <label>Statut (<span style="color:red;">*</span>)</label>
                                {% render_field form.statut class="form-control" %}
                            </div>
                        </div>
                    </div>
                </div>

              <div class="modal-footer">
                <button type="submit" class="btn btn-success">Enregistrer</button>
              </div>
          </form>
    </div>
</div>
{% endblock content %}

{% block custom_js %}
<script>
    $('#sField').change(function(){
        $('#sForm').submit()
    });
</script>
{% endblock custom_js %}