Many improvements
This commit is contained in:
@@ -111,6 +111,12 @@
|
||||
x-model="fields.file_number" @blur="validateField('file_number')"
|
||||
:class="formValidation.fields.file_number.valid == false ? 'border-co-red border-2' : 'border-gray-300'">
|
||||
</div>
|
||||
|
||||
{{ $fieldName := "address" }}
|
||||
{{ template "address_autocomplete" dict "FieldName" $fieldName }}
|
||||
|
||||
<!-- will dolater : tags, groups, ... -->
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -125,74 +131,34 @@
|
||||
<div class="mt-5 space-y-6 md:mt-0 md:col-span-2">
|
||||
<div class="grid grid-cols-6 gap-6">
|
||||
|
||||
{{range .ViewState.profile_optional_fields}}
|
||||
<div class="col-span-6 sm:col-span-3">
|
||||
<label for="gender" class="block text-sm font-medium text-gray-700">Genre</label>
|
||||
<label for="{{.name}}" class="block text-sm font-medium text-gray-700">{{.label}}</label>
|
||||
{{if eq .type "select"}}
|
||||
<div class="sm:mt-0 sm:col-span-2">
|
||||
<select id="gender" name="gender" autocomplete="gender" x-model="gender"
|
||||
<select id="{{.name}}" name="{{.name}}"
|
||||
{{if eq .name "gender"}}x-model="gender"{{else}}x-model="other_properties.{{.name}}"{{end}}
|
||||
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">
|
||||
<option value="0">Inconnu</option>
|
||||
<option value="1">Masculin</option>
|
||||
<option value="2">Féminin</option>
|
||||
<option value="9">Sans objet</option>
|
||||
{{range .options}}
|
||||
<option value="{{.value}}">{{.label}}</option>
|
||||
{{end}}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-span-6 sm:col-span-3">
|
||||
<label for="situation" class="block text-sm font-medium text-gray-700">Situation sociale</label>
|
||||
<div class="sm:mt-0 sm:col-span-2">
|
||||
<select id="situation" name="situation" autocomplete="situation" x-model="other_properties.situation"
|
||||
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">
|
||||
<option value="">Inconnu</option>
|
||||
<option value="BRSA">BRSA</option>
|
||||
<option value="Demandeur d'emploi">Demandeur d'emploi</option>
|
||||
<option value="Chantier">Chantier d'insertion</option>
|
||||
<option value="Jeune -25">Jeune -25</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-span-6 sm:col-span-3">
|
||||
<label for="situation" class="block text-sm font-medium text-gray-700">Motif d'inscription</label>
|
||||
<div class="sm:mt-0 sm:col-span-2">
|
||||
<select id="situation" name="situation" autocomplete="situation" x-model="other_properties.subscription_reason"
|
||||
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">
|
||||
<option value="Autre">Inconnu</option>
|
||||
<option value="Pas de permis">Pas de permis</option>
|
||||
<option value="Pas de véhicule">Pas de véhicule</option>
|
||||
<option value="Perte d'autonomie">Perte d'autonomie</option>
|
||||
<option value="Autre">Autre</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
{{if moduleAvailable "solidarity_transport"}}
|
||||
<div class="col-span-6 sm:col-span-3">
|
||||
<label for="status" class="block text-sm font-medium text-gray-700">Statut (prioritaire / non prioritaire)</label>
|
||||
<div class="sm:mt-0 sm:col-span-2">
|
||||
<select id="status" name="status" autocomplete="status" x-model="other_properties.status"
|
||||
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">
|
||||
<option value="Non prioritaire">Non prioritaire</option>
|
||||
<option value="Prioritaire">Prioritaire</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-span-6 sm:col-span-3">
|
||||
<label for="last_subscription_date" class="block text-sm font-medium text-gray-700">Date de dernière adhésion</label>
|
||||
<input type="date" name="last_subscription_date" id="last_subscription_date" autocomplete="last_subscription_date" placeholder="JJ/MM/AAAA"
|
||||
class="mt-1 focus:ring-co-blue focus:border-co-blue block w-full shadow-sm sm:text-sm rounded-2xl"
|
||||
x-model="other_properties.last_subscription_date">
|
||||
</div>
|
||||
<div class="col-span-6 sm:col-span-3">
|
||||
<label for="previous_solidarity_transport" class="block text-sm font-medium text-gray-700">Nombre de transports solidaires précédents</label>
|
||||
<input type="number" name="previous solidarity_transport" id="previous_solidarity_transport" placeholder="0"
|
||||
class="mt-1 focus:ring-co-blue focus:border-co-blue block w-full shadow-sm sm:text-sm rounded-2xl"
|
||||
x-model="other_properties.previous_solidarity_transport">
|
||||
{{else if eq .type "textarea"}}
|
||||
<textarea id="{{.name}}" name="{{.name}}" rows="3" x-model="other_properties.{{.name}}"
|
||||
class="mt-1 focus:ring-co-blue focus:border-co-blue block w-full shadow-sm sm:text-sm border-gray-300 rounded-2xl"></textarea>
|
||||
{{else if eq .type "date"}}
|
||||
<input type="date" id="{{.name}}" name="{{.name}}" x-model="other_properties.{{.name}}"
|
||||
class="mt-1 focus:ring-co-blue focus:border-co-blue block w-full shadow-sm sm:text-sm border-gray-300 rounded-2xl">
|
||||
{{else if eq .type "number"}}
|
||||
<input type="number" id="{{.name}}" name="{{.name}}" x-model="other_properties.{{.name}}"
|
||||
class="mt-1 focus:ring-co-blue focus:border-co-blue block w-full shadow-sm sm:text-sm border-gray-300 rounded-2xl">
|
||||
{{else}}
|
||||
<input type="text" id="{{.name}}" name="{{.name}}" x-model="other_properties.{{.name}}"
|
||||
class="mt-1 focus:ring-co-blue focus:border-co-blue block w-full shadow-sm sm:text-sm border-gray-300 rounded-2xl">
|
||||
{{end}}
|
||||
</div>
|
||||
{{end}}
|
||||
<div class="col-span-6 sm:col-span-3">
|
||||
<label for="comment" class="block text-sm font-medium text-gray-700">Commentaire</label>
|
||||
<textarea name="comment" id="comment"
|
||||
class="mt-1 focus:ring-co-blue focus:border-co-blue block w-full shadow-sm sm:text-sm rounded-2xl"
|
||||
x-model="other_properties.comment"></textarea>
|
||||
</div>
|
||||
|
||||
<!-- <div class="col-span-3 sm:col-span-3">
|
||||
<label class="block text-sm font-medium text-gray-700"> Photo </label>
|
||||
@@ -212,22 +178,6 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<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">
|
||||
<h3 class="text-lg font-medium leading-6 text-gray-900">Paramètres</h3>
|
||||
<p class="mt-1 text-sm text-gray-500">Paramètres liés au bénéficiaire, utiles pour exploiter les fonctionnalités de PARCOURSMOB</p>
|
||||
</div>
|
||||
<div class="mt-5 space-y-6 md:mt-0 md:col-span-2">
|
||||
|
||||
{{ $fieldName := "address" }}
|
||||
{{ template "address_autocomplete" dict "FieldName" $fieldName }}
|
||||
|
||||
<!-- will dolater : tags, groups, ... -->
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="flex justify-end">
|
||||
<p x-show="! isFormValid" class="px-4 py-2 text-sm text-co-red">Certains champs de sont pas valides.</p>
|
||||
|
||||
Reference in New Issue
Block a user