<!-- Modal Create / Edit Type Diplome -->

<div class="modal-overlay" id="formModal">

    <div class="modal-content" style="max-width:600px;">

        <div class="modal-header">

            <h2 id="modalTitle">
                Nouveau Type de Diplôme
            </h2>

            <button
                    type="button"
                    class="modal-close"
                    onclick="closeModal()">

                &times;

            </button>

        </div>

        <div class="modal-body">

            <form id="typeDiplomeForm">

                <input
                        type="hidden"
                        id="typeDiplomeId"
                        value="">

                <div class="form-group">

                    <label for="libelle">

                        Libellé

                        <span class="required">*</span>

                    </label>

                    <input
                            type="text"
                            id="libelle"
                            name="libelle"
                            placeholder="Ex : Licence, Master, Doctorat"
                            required>

                </div>


                <div class="form-group">

                    <label for="code">

                        Code

                        <span class="required">*</span>

                    </label>

                    <input
                            type="text"
                            id="code"
                            name="code"
                            placeholder="Ex : LIC, MSTR, DOC"
                            required>

                    <small class="form-text">

                        Code unique identifiant le type de diplôme.

                    </small>

                </div>


                <div class="form-group">

                    <label for="annee_apres_bac">

                        Années après Bac

                        <span class="required">*</span>

                    </label>

                    <input
                            type="number"
                            id="annee_apres_bac"
                            name="annee_apres_bac"
                            placeholder="Ex: 5"
                            min="0"
                            required>

                    <small class="form-text">

                        Nombre d'années d'études après le baccalauréat.

                    </small>

                </div>


                <div class="form-actions">

                    <button
                            type="button"
                            class="btn btn-secondary"
                            onclick="closeModal()">

                        <i class="fas fa-times"></i>

                        Annuler

                    </button>


                    <button
                            type="button"
                            class="btn btn-primary"
                            onclick="saveTypeDiplome()">

                        <i class="fas fa-save"></i>

                        Enregistrer

                    </button>

                </div>

            </form>

        </div>

    </div>

</div>
