Aller-retour et autres améliorations (transport soolidaire)
This commit is contained in:
@@ -15,12 +15,7 @@
|
||||
file_number: '{{ .ViewState.Data.file_number }}',
|
||||
gender: {{.ViewState.Data.gender}}
|
||||
},
|
||||
other_properties: {
|
||||
situation: '{{.ViewState.Data.other_properties.situation}}',
|
||||
subscription_reason: '{{.ViewState.Data.other_properties.subscription_reason}}',
|
||||
status: '{{.ViewState.Data.other_properties.status}}',
|
||||
comment: '{{.ViewState.Data.other_properties.comment}}'
|
||||
},
|
||||
other_properties: {{if .ViewState.Data.other_properties}}{{ json .ViewState.Data.other_properties }}{{else}}{}{{end}},
|
||||
other_properties_serialized: null,
|
||||
rules: {
|
||||
first_name: ['required'],
|
||||
@@ -49,6 +44,7 @@
|
||||
this.formValidation.fields[field] = Iodine.assert(this.fields[field], this.rules[field])
|
||||
},
|
||||
submit(event) {
|
||||
this.other_properties_serialized = JSON.stringify(this.other_properties)
|
||||
this.validate()
|
||||
if(!this.formValidation.valid) {
|
||||
this.isFormValid = false
|
||||
@@ -58,6 +54,7 @@
|
||||
}
|
||||
}">
|
||||
<form class="space-y-6" method="POST" @submit="submit">
|
||||
<input type="hidden" name="other_properties" x-model="other_properties_serialized" />
|
||||
<div class="bg-white shadow px-4 py-5 sm:rounded-lg sm:p-6">
|
||||
<div class="md:grid md:grid-cols-3 md:gap-6">
|
||||
<div class="md:col-span-1">
|
||||
@@ -133,8 +130,8 @@
|
||||
<div class="col-span-6 sm:col-span-3">
|
||||
<label for="gender" class="block text-sm font-medium text-gray-700">Genre</label>
|
||||
<div class="sm:mt-0 sm:col-span-2">
|
||||
<select id="gender" name="gender" autocomplete="gender" x-model="gender"
|
||||
class="max-w-lg mt-1 block focus:ring-co-blue focus:border-co-blue w-full shadow-sm sm:max-w-xs sm:text-sm border-gray-300 rounded-2xl">
|
||||
<select id="gender" name="gender" autocomplete="gender" x-model="fields.gender"
|
||||
class="max-w-lg mt-1 block focus:ring-co-blue focus:border-co-blue w-3xs-full shadow-sm sm:max-w-xs sm:text-sm border-gray-300 rounded-2xl">
|
||||
<option value="0">Inconnu</option>
|
||||
<option value="1" :selected="fields.gender == '1'">Masculin</option>
|
||||
<option value="2" :selected="fields.gender == '2'">Féminin</option>
|
||||
|
||||
Reference in New Issue
Block a user