mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-12 21:34:25 +00:00
passing option binModalStep from twig include template
This commit is contained in:
parent
24714227b8
commit
cdbd97e595
@ -65,8 +65,8 @@ export default {
|
|||||||
},
|
},
|
||||||
/// Display each step in page or Modal
|
/// Display each step in page or Modal
|
||||||
bindModal: {
|
bindModal: {
|
||||||
//step1: false,
|
step1: window.binModalStep1,
|
||||||
//step2: false
|
step2: window.binModalStep2
|
||||||
},
|
},
|
||||||
// Options only for root parent component
|
// Options only for root parent component
|
||||||
displayResult: true,
|
displayResult: true,
|
||||||
|
@ -190,11 +190,11 @@ export default {
|
|||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
step1WithModal() {
|
step1WithModal() {
|
||||||
return (this.options.bindModal && typeof this.options.bindModal.step1 !== 'undefined') ?
|
return (this.options.bindModal !== null && typeof this.options.bindModal.step1 !== 'undefined') ?
|
||||||
this.options.bindModal.step1 : this.default.bindModal.step1;
|
this.options.bindModal.step1 : this.default.bindModal.step1;
|
||||||
},
|
},
|
||||||
step2WithModal() {
|
step2WithModal() {
|
||||||
let step2 = (this.options.bindModal && typeof this.options.bindModal.step2 !== 'undefined') ?
|
let step2 = (this.options.bindModal !== null && typeof this.options.bindModal.step2 !== 'undefined') ?
|
||||||
this.options.bindModal.step2 : this.default.bindModal.step2;
|
this.options.bindModal.step2 : this.default.bindModal.step2;
|
||||||
|
|
||||||
if (step2 === false && this.step1WithModal === true) {
|
if (step2 === false && this.step1WithModal === true) {
|
||||||
|
@ -22,6 +22,12 @@
|
|||||||
{% if buttonDisplay is defined and buttonDisplay == false %}
|
{% if buttonDisplay is defined and buttonDisplay == false %}
|
||||||
window.button.display = false;
|
window.button.display = false;
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
{% if binModalStep1 is defined and binModalStep1 == false %}
|
||||||
|
window.binModalStep1 = false
|
||||||
|
{% endif %}
|
||||||
|
{% if binModalStep2 is defined and binModalStep2 == false %}
|
||||||
|
window.binModalStep2 = false
|
||||||
|
{% endif %}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
{{ encore_entry_script_tags('vue_address') }}
|
{{ encore_entry_script_tags('vue_address') }}
|
||||||
|
@ -28,7 +28,9 @@
|
|||||||
|
|
||||||
{% include '@ChillPerson/Address/_insert_vue_address.html.twig' with {
|
{% include '@ChillPerson/Address/_insert_vue_address.html.twig' with {
|
||||||
address_id: person.lastAddress.id,
|
address_id: person.lastAddress.id,
|
||||||
mode: 'edit'
|
mode: 'edit',
|
||||||
|
binModalStep1: false,
|
||||||
|
binModalStep2: false,
|
||||||
} %}
|
} %}
|
||||||
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
@ -25,21 +25,16 @@
|
|||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<h1>{{ block('title') }}</h1>
|
<h1>{{ block('title') }}</h1>
|
||||||
<div id="address"></div>
|
|
||||||
|
{% include '@ChillPerson/Address/_insert_vue_address.html.twig' with {
|
||||||
|
address_id: person.lastAddress.id,
|
||||||
|
mode: 'new',
|
||||||
|
binModalStep1: false,
|
||||||
|
binModalStep2: false,
|
||||||
|
} %}
|
||||||
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block css %}
|
|
||||||
{{ encore_entry_link_tags('vue_address') }}
|
|
||||||
{% endblock %}
|
|
||||||
|
|
||||||
{% block js %}
|
|
||||||
<script type="text/javascript">
|
|
||||||
window.personId = {{ person.id|e('js') }};
|
|
||||||
window.mode = 'new';
|
|
||||||
window.vueRootComponent = 'app';
|
|
||||||
</script>
|
|
||||||
{{ encore_entry_script_tags('vue_address') }}
|
|
||||||
{% endblock %}
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user