Merge remote-tracking branch 'gitea/main' into feat/aep-b4a-carte
This commit is contained in:
@@ -101,6 +101,27 @@
|
||||
</div>
|
||||
<p v-if="err.arrivee" :id="id('arrivee-err')" class="fi-err">{{ err.arrivee }}</p>
|
||||
</fieldset>
|
||||
<!-- Lit (Jules, 04/11) : pour préparer l'attribution des chambres -->
|
||||
<fieldset class="fi-champ" v-bind="ariaGroupe('lit')">
|
||||
<legend>Lit</legend>
|
||||
<div class="fi-choix">
|
||||
<label v-for="l in LITS" :key="l" class="fi-option">
|
||||
<input v-model="f.lit" type="radio" :name="id('lit')" :value="l" required>
|
||||
<span>{{ LITS_LABELS[l] }}</span>
|
||||
</label>
|
||||
</div>
|
||||
<p v-if="err.lit" :id="id('lit-err')" class="fi-err">{{ err.lit }}</p>
|
||||
</fieldset>
|
||||
<div v-if="f.lit === 'double'" class="fi-champ">
|
||||
<label :for="id('lit_avec')">Avec qui ? (prénom et nom)</label>
|
||||
<input
|
||||
:id="id('lit_avec')" v-model="f.lit_avec" maxlength="140" required autocomplete="off"
|
||||
:aria-invalid="err.lit_avec ? 'true' : undefined"
|
||||
:aria-describedby="err.lit_avec ? `${id('lit_avec-aide')} ${id('lit_avec-err')}` : id('lit_avec-aide')"
|
||||
>
|
||||
<p :id="id('lit_avec-aide')" class="fi-aide">Cette personne doit aussi s'inscrire avec ce formulaire.</p>
|
||||
<p v-if="err.lit_avec" :id="id('lit_avec-err')" class="fi-err">{{ err.lit_avec }}</p>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<div class="fi-champ">
|
||||
@@ -167,7 +188,7 @@
|
||||
|
||||
<script setup lang="ts">
|
||||
import {
|
||||
ARRIVEES_CODEV, DEPARTS_CODEV, ARRIVEES_FORET, ARRIVEES_FORET_LABELS, VOITURES, VOITURES_LABELS, ENTREES, ENTREES_LABELS,
|
||||
ARRIVEES_CODEV, DEPARTS_CODEV, ARRIVEES_FORET, ARRIVEES_FORET_LABELS, VOITURES, VOITURES_LABELS, ENTREES, ENTREES_LABELS, LITS, LITS_LABELS,
|
||||
InscriptionSchema, erreursParChamp, type PageInscription,
|
||||
} from '~/utils/inscriptionEvenement'
|
||||
import { evenement } from '~/data/evenements/ruetz-2026'
|
||||
@@ -185,7 +206,7 @@ const f = reactive({
|
||||
prenom: '', nom: '', email: '', telephone: '',
|
||||
arrivee: (props.page === 'codev' && ARRIVEES_CODEV.length === 1 ? ARRIVEES_CODEV[0] : '') as string,
|
||||
depart: '' as string,
|
||||
nb_personnes: 1, nb_enfants: 0,
|
||||
nb_personnes: 1, nb_enfants: 0, lit: '' as string, lit_avec: '',
|
||||
besoin_alimentaire: '', voiture: '' as string, mot: '', site_web: '', entree: '' as string,
|
||||
})
|
||||
const err = ref<Record<string, string>>({})
|
||||
@@ -216,7 +237,7 @@ function corps() {
|
||||
}
|
||||
return props.page === 'codev'
|
||||
? { ...commun, arrivee: f.arrivee, depart: f.depart, entree: f.entree }
|
||||
: { ...commun, nb_personnes: f.nb_personnes, nb_enfants: f.nb_enfants, arrivee: f.arrivee }
|
||||
: { ...commun, nb_personnes: f.nb_personnes, nb_enfants: f.nb_enfants, arrivee: f.arrivee, lit: f.lit, lit_avec: f.lit === 'double' ? f.lit_avec : '' }
|
||||
}
|
||||
|
||||
function focusPremiereErreur() {
|
||||
@@ -305,6 +326,7 @@ input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px
|
||||
.fi-option:has(input:focus-visible) { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
|
||||
.fi-option input { width: 20px; height: 20px; margin: 0; flex: none; accent-color: var(--nav-primary-solid); }
|
||||
|
||||
.fi-aide { margin: 0; font-size: var(--fs-sm); color: var(--evt-attenue); }
|
||||
.fi-err { margin: 0; font-size: var(--fs-sm); color: var(--danger); font-weight: var(--fw-semibold); }
|
||||
.fi-err--envoi { padding: var(--space-sm) var(--space-md); border-radius: var(--radius-md); background: color-mix(in srgb, var(--danger) 8%, var(--surface)); }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user