<!-- Inscription eleve =============================================================  -->
<div class="modal animate__animated animate__fadeInLeft" id="modalFormeleve">
    <div onclick="closeForm('modalFormeleve')" class="modal-background"></div>
    <div class="modal-card">
        <header class="modal-card-head">
            <p class="modal-card-title">Inscription</p>
            <button type="button" onclick="closeForm('modalFormeleve')" class="delete"
                aria-label="close"></button>
        </header>
        <section class="modal-card-body">
            <div class="content">
                <form id="formeleve">
                    @csrf
                    <div class="field">
                        <label class="label title is-6" for="prenom_id">Prénom</label>
                        <p class="control">
                            <input id="prenom_id"
                                class="input is-info is-rounded
                                @error('prenom') is-invalid @enderror"
                                type="text" placeholder="Papa Abdou" name="prenom" required />
                        </p>
                        @error('prenom')
                            <div class="help is-danger error">{{ $message }}</div>
                        @enderror
                    </div>
                    <div class="field">
                        <label class="label title is-6" for="nom_id">Nom</label>
                        <p class="control">
                            <input id="nom_id"
                                class="input is-info is-rounded
                                @error('nom') is-invalid @enderror"
                                type="text" placeholder="Mbodji" name="nom" required />
                        </p>
                        @error('nom')
                            <div class="help is-danger error">{{ $message }}</div>
                        @enderror
                    </div>
                    <div class="field">
                        <label class="label title is-6" for="date_naissance_id">Date de naissance</label>
                        <p class="control">
                            <input id="date_naissance_id"
                                class="input is-info is-rounded
                                @error('date_naissance') is-invalid @enderror"
                                type="date" placeholder="01/01/2000" name="date_naissance" required />
                        </p>
                        @error('date_naissance')
                            <div class="help is-danger error">{{ $message }}</div>
                        @enderror
                    </div>
                    <div class="field">
                        <label class="label title is-6" for="lieu_naissance_id">Lieu de naissance</label>
                        <p class="control">
                            <input id="lieu_naissance_id"
                                class="input is-info is-rounded
                                @error('lieu_naissance') is-invalid @enderror"
                                type="text" placeholder="Dakar" name="lieu_naissance" required />
                        </p>
                        @error('lieu_naissance')
                            <div class="help is-danger error">{{ $message }}</div>
                        @enderror
                    </div>
                    <div class="field">
                        <label class="label title is-6" for="adresse_id">Adresse</label>
                        <p class="control">
                            <input id="adresse_id"
                                class="input is-info is-rounded
                                @error('adresse') is-invalid @enderror"
                                type="text" placeholder="Cambérène Quartier Deggo" name="adresse" required />
                        </p>
                        @error('adresse')
                            <div class="help is-danger error">{{ $message }}</div>
                        @enderror
                    </div>
                    <div class="field">
                        <label class="label title is-6" for="tuteur_id">Prénom et Nom du tuteur</label>
                        <p class="control">
                            <input id="tuteur_id"
                                class="input is-info is-rounded
                                @error('tuteur') is-invalid @enderror"
                                type="text" placeholder="Abdoulaye Fall" name="tuteur" required />
                        </p>
                        @error('tuteur')
                            <div class="help is-danger error">{{ $message }}</div>
                        @enderror
                    </div>
                    <div class="field">
                        <label class="label title is-6" for="tel_tuteur_id">Téléphone du tuteur</label>
                        <p class="control">
                            <input id="tel_tuteur_id"
                                class="input input-phone is-info is-rounded
                                @error('tel_tuteur') is-invalid @enderror"
                                type="tel" placeholder="77 278 22 78" name="tel_tuteur" required />
                        </p>
                        @error('tel_tuteur')
                            <div class="help is-danger error">{{ $message }}</div>
                        @enderror
                    </div>
                    <div class="field">
                        <label class="label title is-6" for="autre_tel_id">Autre Téléphone</label>
                        <p class="control">
                            <input id="autre_tel_id"
                                class="input input-phone is-info is-rounded
                                @error('autre_tel') is-invalid @enderror"
                                type="tel" placeholder="77 278 22 78" name="autre_tel" />
                        </p>
                        @error('autre_tel')
                            <div class="help is-danger error">{{ $message }}</div>
                        @enderror
                    </div>
                    <div class="field mb-5">
                        <label class="label title is-6" for="classe_id">Classe</label>
                        <div class="control">
                            <div class="select is-info is-rounded">
                                <select id="classe_id" name="classe"
                                    class="@error('classe') is-invalid
                                    @enderror"
                                    required>
                                    <option value="" disabled selected>Sélectionner</option>
                                    @foreach ($classes as $classe)
                                        <option value="{{ $classe->id }}">{{ $classe->libelle }}</option>
                                    @endforeach
                                </select>
                            </div>
                        </div>
                        @error('classe')
                            <div class="help is-danger error">{{ $message }}</div>
                        @enderror
                    </div>
                    <div class="field">
                        <label class="label title is-6" for="inscription_id">Montant de l'inscription</label>
                        <p class="control">
                            <input id="inscription_id"
                                class="input input-numeral is-info is-rounded
                                @error('inscription') is-invalid @enderror"
                                type="text" placeholder="Inscription de l'élève" name="inscription" required />
                        </p>
                        @error('inscription')
                            <div class="help is-danger error">{{ $message }}</div>
                        @enderror
                    </div>
                    <div class="field">
                        <label class="label title is-6" for="mensualite_id">Montant de la mensualité</label>
                        <p class="control">
                            <input id="mensualite_id"
                                class="input input-numeral is-info is-rounded
                                @error('mensualite') is-invalid @enderror"
                                type="text" placeholder="Mensualité de l'élève" name="mensualite" required />
                        </p>
                        @error('mensualite')
                            <div class="help is-danger error">{{ $message }}</div>
                        @enderror
                    </div>
                    <button id="btn_submit_formeleve" hidden></button>
                    <button type="reset" class="btn_reset" hidden></button>
                </form>
            </div>
        </section>
        <footer class="modal-card-foot">
            <button type="button" onclick="closeForm('modalFormeleve')"
                class="button is-light is-danger is-rounded">Annuler</button>
            <button onclick="$('#btn_submit_formeleve').click()" class="button is-info is-rounded">Inscrire
                l'élève</button>
        </footer>
    </div>
</div>
