<!-- Modifier Evaluation========================================================= -->
<div class="modal animate__animated animate__bounce" id="modal_modifier_evaluation">
    <div onclick="closeForm('modal_modifier_evaluation')" class="modal-background"></div>
    <div class="modal-card">
        <header class="modal-card-head">
            <p class="modal-card-title">Modifier l'évaluation</p>
            <button type="button" onclick="closeForm('modal_modifier_evaluation')" class="delete"
                aria-label="close"></button>
        </header>
        <section class="modal-card-body">
            <div class="content">
                <form id="form_modifier_evaluation">
                    @csrf
                    <div class="field mb-5">
                        <label class="label title is-6" for="nv_matiere_id">Matière</label>
                        <div class="control">
                            <div class="select is-info is-rounded">
                                <select id="nv_matiere_id" name="nv_matiere"
                                    class="@error('nv_matiere') is-invalid
                                    @enderror"
                                    required>
                                    @if ($classe->type == 'Primaire')
                                        @foreach ($matieres as $matiere)
                                            @if ($matiere->niveau == 'Primaire')
                                                <option value="{{ $matiere->id }}">{{ $matiere->libelle }}</option>
                                            @endif
                                        @endforeach
                                    @else
                                        @foreach ($matieres as $matiere)
                                            @if ($matiere->niveau == 'Secondaire')
                                                <option value="{{ $matiere->id }}">{{ $matiere->libelle }}</option>
                                            @endif
                                        @endforeach
                                    @endif
                                </select>
                            </div>
                        </div>
                        @error('nv_matiere')
                            <div class="help is-danger error">{{ $message }}</div>
                        @enderror
                    </div>
                    <div class="field mb-5">
                        <label class="label title is-6" for="nv_semestre_id">Trimestre/Semestre</label>
                        <div class="control">
                            <div class="select is-info is-rounded">
                                <select id="nv_semestre_id" name="nv_semestre"
                                    class="@error('nv_semestre') is-invalid
                                    @enderror"
                                    required>
                                    <option value="" disabled selected>Sélectionner</option>
                                    @if ($classe->type == 'Primaire')
                                        <option value="1">Trimestre 1</option>
                                        <option value="2">Trimestre 2</option>
                                        <option value="3">Trimestre 3</option>
                                    @else
                                        <option value="1">Semestre 1</option>
                                        <option value="2">Semestre 2</option>
                                        <option value="1">Trimestre 1</option>
                                        <option value="2">Trimestre 2</option>
                                        <option value="3">Trimestre 3</option>
                                    @endif
                                </select>
                            </div>
                        </div>
                        @error('nv_semestre')
                            <div class="help is-danger error">{{ $message }}</div>
                        @enderror
                    </div>
                    <div class="field">
                        <label class="label title is-6" for="nv_date_id">Date</label>
                        <p class="control">
                            <input id="nv_date_id"
                                class="input is-info is-rounded
                                @error('nv_date') is-invalid @enderror"
                                type="date" name="nv_date" required />
                        </p>
                        @error('nv_date')
                            <div class="help is-danger error">{{ $message }}</div>
                        @enderror
                    </div>
                    <button id="submit_form_modifier_evaluation" hidden></button>
                    <button type="reset" class="btn_reset" hidden></button>
                </form>
            </div>
        </section>
        <footer class="modal-card-foot">
            <button type="button" onclick="closeForm('modal_modifier_evaluation')"
                class="button is-light is-danger is-rounded">Annuler</button>
            <button onclick="$('#submit_form_modifier_evaluation').click()"
                class="button is-info is-link is-rounded">Enregistrer</button>
        </footer>
    </div>
</div>
