<!-- Ajouter matiere =============================================================  -->
<div class="modal animate__animated animate__fadeInLeft" id="modalAjouterMatiere">
    <div onclick="closeForm('modalAjouterMatiere')" class="modal-background"></div>
    <div class="modal-card">
        <header class="modal-card-head">
            <p class="modal-card-title">Ajouter matière</p>
            <button type="button" onclick="closeForm('modalAjouterMatiere')" class="delete"
                aria-label="close"></button>
        </header>
        <section class="modal-card-body">
            <div class="content">
                <form id="form_ajouter_matiere">
                    @csrf
                    <div class="field">
                        <label class="label title is-6" for="libelle_matiere_id">Libelle</label>
                        <p class="control">
                            <input id="libelle_matiere_id"
                                class="input is-info is-rounded
                                @error('libelle_matiere') is-invalid @enderror"
                                type="text" placeholder="Histoire-Géographie" name="libelle_matiere" required />
                        </p>
                        @error('libelle_matiere')
                            <div class="help is-danger error">{{ $message }}</div>
                        @enderror
                    </div>
                    <div class="field mb-5">
                        <label class="label title is-6" for="niveau_matiere_id">Niveau</label>
                        <div class="control">
                            <div class="select is-info is-rounded">
                                <select id="niveau_matiere_id" name="niveau_matiere"
                                    class="@error('niveau_matiere') is-invalid @enderror" required>
                                    <option value="" disabled selected>Sélectionner</option>
                                    <option value="Primaire">Primaire</option>
                                    <option value="Secondaire">Secondaire</option>
                                </select>
                            </div>
                        </div>
                        @error('niveau_matiere')
                            <div class="help is-danger error">{{ $message }}</div>
                        @enderror
                    </div>
                    <div class="field" id="field_coef">
                        <label class="label title is-6" for="coef_matiere_id">Barême/Coefficient</label>
                        <p class="control">
                            <input id="coef_matiere_id"
                                class="input is-info is-rounded
                                @error('coef_matiere') is-invalid @enderror"
                                type="number" placeholder="Barême/Coefficient de la matière" name="coef_matiere"
                                required />
                        </p>
                        @error('coef_matiere')
                            <div class="help is-danger error">{{ $message }}</div>
                        @enderror
                    </div>
                    <button id="btn_submit_form_ajouter_matiere" hidden></button>
                    <button type="reset" class="btn_reset" hidden></button>
                </form>
            </div>
        </section>
        <footer class="modal-card-foot">
            <button type="button" onclick="closeForm('modalAjouterMatiere')"
                class="button is-light is-danger is-rounded">Annuler</button>
            <button onclick="$('#btn_submit_form_ajouter_matiere').click()" class="button is-info is-rounded">Ajouter
                la matière</button>
        </footer>
    </div>
</div>
