handleCancelSubmit method, which falsifies readyToSubmit

This commit is contained in:
Andrew Croce 2018-10-04 14:11:22 -04:00
parent aba2eb28ed
commit cb3947962c
2 changed files with 6 additions and 1 deletions

View File

@ -94,6 +94,11 @@ export default {
}
},
handleCancelSubmit: function () {
this.readyToSubmit = false
this.closeModal(this.modalName)
},
validateAndOpenModal: function (modalName) {
let isValid = this.$children.reduce((previous, newVal) => {
// display textInput error if it is not valid

View File

@ -23,7 +23,7 @@
<div class='action-group'>
<button type='submit' class='action-group__action usa-button' tabindex='0'>{{ action_text }} Project</button>
<button type='button' v-on:click="closeModal('{{ modalName }}')" class='icon-link action-group__action' tabindex='0'>Cancel</button>
<button type='button' v-on:click="handleCancelSubmit" class='icon-link action-group__action' tabindex='0'>Cancel</button>
</div>
{% endcall %}