mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-12 13:24:25 +00:00
person: Add checkobox for adding address in AddPerson
This commit is contained in:
parent
355c5cf8fd
commit
584111b5f7
@ -138,7 +138,14 @@
|
||||
aria-describedby="email" />
|
||||
</div>
|
||||
|
||||
<div v-if="action === 'create'" class="form-floating mb-3">
|
||||
<div class="input-group mb-3 form-check">
|
||||
<input class="form-check-input"
|
||||
type='checkbox'
|
||||
v-model="showAddressForm"
|
||||
name='showAddressForm'/>
|
||||
<label class="form-check-label">{{ $t('person.address.show_address_form') }}</label>
|
||||
</div>
|
||||
<div v-if="action === 'create' && showAddressFormValue" class="form-floating mb-3">
|
||||
<add-address
|
||||
:context="addAddress.context"
|
||||
:options="addAddress.options"
|
||||
@ -181,6 +188,7 @@ export default {
|
||||
altNames: [],
|
||||
civilities: []
|
||||
},
|
||||
showAddressFormValue: false,
|
||||
addAddress: {
|
||||
options: {
|
||||
button: {
|
||||
@ -241,6 +249,10 @@ export default {
|
||||
set(value) { this.person.email = value; },
|
||||
get() { return this.person.email; }
|
||||
},
|
||||
showAddressForm: {
|
||||
set(value) { this.showAddressFormValue = value; },
|
||||
get() { return this.showAddressFormValue; }
|
||||
},
|
||||
genderClass() {
|
||||
switch (this.person.gender) {
|
||||
case 'woman':
|
||||
@ -349,4 +361,9 @@ dl {
|
||||
margin-left: 1em;
|
||||
}
|
||||
}
|
||||
div.form-check {
|
||||
label {
|
||||
margin-left: 1rem;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
@ -44,7 +44,8 @@ const personMessages = {
|
||||
placeholder: "Choisissez la civilité",
|
||||
},
|
||||
address: {
|
||||
create_address: "Ajouter une adresse"
|
||||
create_address: "Ajouter une adresse",
|
||||
show_address_form: "Créer un ménage et ajouter une adresse"
|
||||
}
|
||||
},
|
||||
error_only_one_person: "Une seule personne peut être sélectionnée !"
|
||||
|
Loading…
x
Reference in New Issue
Block a user