reset modal state on close for new portfolio member modal
This commit is contained in:
parent
ca0c280ac5
commit
836fdbdcd2
@ -34,6 +34,7 @@ export default {
|
|||||||
|
|
||||||
mounted: function() {
|
mounted: function() {
|
||||||
this.$root.$on('field-change', this.handleValidChange)
|
this.$root.$on('field-change', this.handleValidChange)
|
||||||
|
this.$on('modalOpen', this.handleModalOpen)
|
||||||
},
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
@ -61,6 +62,9 @@ export default {
|
|||||||
const { name, optional } = event
|
const { name, optional } = event
|
||||||
this.fields[name] = optional
|
this.fields[name] = optional
|
||||||
},
|
},
|
||||||
|
handleModalOpen: function(_bool) {
|
||||||
|
this.step = 0
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
computed: {},
|
computed: {},
|
||||||
|
@ -36,12 +36,14 @@
|
|||||||
<form action="{{ form_action }}" method="POST">
|
<form action="{{ form_action }}" method="POST">
|
||||||
{{ form.csrf_token }}
|
{{ form.csrf_token }}
|
||||||
{% call Modal(name=name, dismissable=dismissable, classes="wide") %}
|
{% call Modal(name=name, dismissable=dismissable, classes="wide") %}
|
||||||
|
<div v-if="activeModal === '{{ name }}'">
|
||||||
{% for step in steps %}
|
{% for step in steps %}
|
||||||
<div class="modal__form" v-show="step === {{ loop.index0 }}">
|
<div class="modal__form" v-show="step === {{ loop.index0 }}">
|
||||||
{{ FormSteps(step_count, loop.index) }}
|
{{ FormSteps(step_count, loop.index) }}
|
||||||
{{ step }}
|
{{ step }}
|
||||||
</div>
|
</div>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
</div>
|
||||||
{% endcall %}
|
{% endcall %}
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user