mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-13 13:54:23 +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" />
|
aria-describedby="email" />
|
||||||
</div>
|
</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
|
<add-address
|
||||||
:context="addAddress.context"
|
:context="addAddress.context"
|
||||||
:options="addAddress.options"
|
:options="addAddress.options"
|
||||||
@ -181,6 +188,7 @@ export default {
|
|||||||
altNames: [],
|
altNames: [],
|
||||||
civilities: []
|
civilities: []
|
||||||
},
|
},
|
||||||
|
showAddressFormValue: false,
|
||||||
addAddress: {
|
addAddress: {
|
||||||
options: {
|
options: {
|
||||||
button: {
|
button: {
|
||||||
@ -241,6 +249,10 @@ export default {
|
|||||||
set(value) { this.person.email = value; },
|
set(value) { this.person.email = value; },
|
||||||
get() { return this.person.email; }
|
get() { return this.person.email; }
|
||||||
},
|
},
|
||||||
|
showAddressForm: {
|
||||||
|
set(value) { this.showAddressFormValue = value; },
|
||||||
|
get() { return this.showAddressFormValue; }
|
||||||
|
},
|
||||||
genderClass() {
|
genderClass() {
|
||||||
switch (this.person.gender) {
|
switch (this.person.gender) {
|
||||||
case 'woman':
|
case 'woman':
|
||||||
@ -349,4 +361,9 @@ dl {
|
|||||||
margin-left: 1em;
|
margin-left: 1em;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
div.form-check {
|
||||||
|
label {
|
||||||
|
margin-left: 1rem;
|
||||||
|
}
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
@ -44,7 +44,8 @@ const personMessages = {
|
|||||||
placeholder: "Choisissez la civilité",
|
placeholder: "Choisissez la civilité",
|
||||||
},
|
},
|
||||||
address: {
|
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 !"
|
error_only_one_person: "Une seule personne peut être sélectionnée !"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user