From 719c02e625cd3d5d8365e1ac7da248da69e25c2f Mon Sep 17 00:00:00 2001 From: Bubka <858858+Bubka@users.noreply.github.com> Date: Tue, 25 Feb 2020 09:07:17 +0100 Subject: [PATCH] Add IsDisabled option to Form and FormButtons components --- resources/js/components/Form.js | 3 ++- resources/js/components/FormButtons.vue | 7 ++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/resources/js/components/Form.js b/resources/js/components/Form.js index c7c8b0ad..059f26b2 100644 --- a/resources/js/components/Form.js +++ b/resources/js/components/Form.js @@ -11,6 +11,7 @@ class Form { */ constructor (data = {}) { this.isBusy = false + this.isDisabled = false // this.successful = false this.errors = new Errors() // this.originalData = deepCopy(data) @@ -268,6 +269,6 @@ class Form { Form.routes = {} Form.errorMessage = 'Something went wrong. Please try again.' -Form.ignore = ['isBusy', /*'successful'*/, 'errors', 'originalData'] +Form.ignore = ['isBusy', 'isDisabled', 'errors', 'originalData'] export default Form diff --git a/resources/js/components/FormButtons.vue b/resources/js/components/FormButtons.vue index e231ccd3..472caa50 100644 --- a/resources/js/components/FormButtons.vue +++ b/resources/js/components/FormButtons.vue @@ -1,7 +1,7 @@