transmit all options from a twig include template

This commit is contained in:
2021-08-06 21:20:59 +02:00
parent da09e10fb1
commit 24714227b8
6 changed files with 89 additions and 44 deletions

View File

@@ -41,32 +41,36 @@ export default {
edit: window.mode === 'edit',
personId: window.personId,
addressId: window.addressId,
backUrl: `/fr/person/${window.personId}/address/list`, //TODO better way to pass this
backUrl: window.backUrl,
},
addAddress: {
options: {
/// Options override default
/// First button text if create or edit address (trans chain, see i18n)
/// Options override default.
/// null value take default component value
button: {
//text: { create: 'bim', edit: 'bam' },
type: 'btn-update',
size: 'btn-sm',
display: false
text: {
/// if create or edit address
create: window.buttonText || null,
edit: window.buttonText || null
},
type: window.button.type || null,
size: window.button.size || null,
display: window.button.display
},
/// Modal title text if create or edit address (trans chain, see i18n)
//title: { create: 'boum', edit: 'pan' },
title: {
create: window.modalTitle || null,
edit: window.modalTitle || null
},
/// Display each step in page or Modal
bindModal: {
//step1: false,
//step2: false
},
// Options only for root parent component
displayResult: true,
redirectToBackUrl: false
redirectToBackUrl: true
},
type: 'person',
result: null // <== returned from addAddress component