addAddress: allow other rootcomponent to not precise bindmodal options

This commit is contained in:
Mathieu Jaumotte 2021-09-16 21:21:40 +02:00
parent c58d1eccc5
commit 6ab1391bd8
2 changed files with 8 additions and 6 deletions

View File

@ -187,14 +187,14 @@ export default {
},
computed: {
step1WithModal() {
console.log('options displayText', this.options.button.displayText);
console.log('options bindModal.step1', this.options.bindModal.step1);
console.log('options bindModal.step2', this.options.bindModal.step2);
return (this.options.bindModal !== null && typeof this.options.bindModal.step1 !== 'undefined') ?
//console.log('options displayText', this.options.button.displayText);
//console.log('options bindModal.step1', this.options.bindModal.step1);
//console.log('options bindModal.step2', this.options.bindModal.step2);
return (typeof this.options.bindModal !== 'undefined' && typeof this.options.bindModal.step1 !== 'undefined') ?
this.options.bindModal.step1 : this.default.bindModal.step1;
},
step2WithModal() {
let step2 = (this.options.bindModal !== null && typeof this.options.bindModal.step2 !== 'undefined') ?
let step2 = (typeof this.options.bindModal !== 'undefined' && typeof this.options.bindModal.step2 !== 'undefined') ?
this.options.bindModal.step2 : this.default.bindModal.step2;
if (step2 === false && this.step1WithModal === true) {

View File

@ -45,7 +45,9 @@ containers.forEach((container) => {
bindModal: {
step1: container.dataset.bindModalStep1 !== 'false', //boolean, default: true
step2: container.dataset.bindModalStep2 !== 'false' //boolean, default: true
}
},
// Hide ValidFrom Date fields
//hideDateFrom: true
}
}
}