<!-- Modifier note========================================================= -->
<div class="modal animate__animated animate__bounce" id="modal_modifier_note">
    <div onclick="closeForm('modal_modifier_note')" class="modal-background"></div>
    <div class="modal-card">
        <header class="modal-card-head">
            <p class="modal-card-title">Modifier la note</p>
            <button type="button" onclick="closeForm('modal_modifier_note')" class="delete"
                aria-label="close"></button>
        </header>
        <section class="modal-card-body">
            <div class="content">
                <form id="form_modifier_note">
                    @csrf
                    <div class="field">
                        <label class="label title is-6" for="nv_type_evaluation_id">Type</label>
                        <div class="control">
                            <div class="select is-info is-rounded">
                                <select id="nv_type_evaluation_id" name="nv_type_evaluation"
                                    class="@error('nv_type_evaluation') is-invalid @enderror" required>
                                    <option value="" disabled selected>Sélectionner</option>
                                    @if ($classe->type == 'Primaire')
                                        <option value="Contrôle">Contrôle</option>
                                        <option value="Composition">Composition</option>
                                    @else
                                        <option value="Devoir">Devoir</option>
                                        <option value="Examen">Examen</option>
                                    @endif
                                </select>
                            </div>
                        </div>
                        @error('nv_type_evaluation')
                            <div class="help is-danger error">{{ $message }}</div>
                        @enderror
                    </div>
                    <div class="field">
                        <label class="label title is-6" for="nv_valeur_id">Valeur</label>
                        <p class="control">
                            <input id="nv_valeur_id"
                                class="input is-info is-rounded @error('nv_valeur') is-invalid @enderror" type="number"
                                placeholder="00" name="nv_valeur" min="0"
                                max="{{ $classe->type == 'Primaire' ? '60' : '20' }}"
                                title="{{ $classe->type == 'Primaire' ? 'Respectez le barême' : 'Entre 0 et 20' }}"
                                required />
                        </p>
                        @error('nv_valeur')
                            <div class="help is-danger error">{{ $message }}</div>
                        @enderror
                    </div>
                    <button id="submit_form_modifier_note" 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_note')"
                class="button is-light is-danger is-rounded">Annuler</button>
            <button class="button is-info is-link is-rounded"
                onclick="$('#submit_form_modifier_note').click()">Enregistrer</button>
        </footer>
    </div>
</div>
