From d2f1f050d11db0bee68969a1e9ceddac552d89f5 Mon Sep 17 00:00:00 2001 From: Burak Civan Date: Wed, 29 Jun 2022 10:09:41 +0300 Subject: [PATCH 1/7] form submit controlled --- resources/assets/js/views/wizard/Company.vue | 11 +++++++---- .../assets/js/views/wizard/Currencies.vue | 19 ++++++++++++------- resources/assets/js/views/wizard/Taxes.vue | 19 ++++++++++++------- 3 files changed, 31 insertions(+), 18 deletions(-) diff --git a/resources/assets/js/views/wizard/Company.vue b/resources/assets/js/views/wizard/Company.vue index 3deb3e984..fa5b6397c 100644 --- a/resources/assets/js/views/wizard/Company.vue +++ b/resources/assets/js/views/wizard/Company.vue @@ -72,17 +72,18 @@
{{ translations.company.skip }} - {{ translations.company.save }} - +
@@ -254,7 +255,9 @@ export default { } }, - onEditSave() { + onEditSave(event) { + event.preventDefault(); + FormData.prototype.appendRecursive = function (data, wrapper = null) { for (var name in data) { if (name == "previewElement" || name == "previewTemplate") { diff --git a/resources/assets/js/views/wizard/Currencies.vue b/resources/assets/js/views/wizard/Currencies.vue index 6c909b892..5d740af12 100644 --- a/resources/assets/js/views/wizard/Currencies.vue +++ b/resources/assets/js/views/wizard/Currencies.vue @@ -91,16 +91,17 @@ {{ translations.currencies.cancel }} - {{ translations.currencies.save }} - + @@ -159,12 +160,12 @@ {{ translations.currencies.cancel }} - + @@ -293,7 +294,9 @@ export default { }, this); }, - onEditForm(item) { + onEditForm(item, event) { + event.preventDefault(); + this.onSubmitEvent( "PATCH", url + "/wizard/currencies/" + item.id, @@ -303,7 +306,9 @@ export default { ); }, - onSubmitForm() { + onSubmitForm(event) { + event.preventDefault(); + this.onSubmitEvent( "POST", url + "/wizard/currencies", diff --git a/resources/assets/js/views/wizard/Taxes.vue b/resources/assets/js/views/wizard/Taxes.vue index b7eee2dce..a29183453 100644 --- a/resources/assets/js/views/wizard/Taxes.vue +++ b/resources/assets/js/views/wizard/Taxes.vue @@ -73,16 +73,17 @@ {{ translations.taxes.cancel }} - {{ translations.taxes.save }} - + @@ -131,12 +132,12 @@ {{ translations.taxes.cancel }} - + @@ -227,7 +228,9 @@ export default { this.onEjetItem(event, this.taxes, event.tax_id); }, - onEditForm(item) { + onEditForm(item, event) { + event.preventDefault(); + this.onSubmitEvent( "PATCH", url + "/wizard/taxes/" + item.id, @@ -247,7 +250,9 @@ export default { this.add_taxes = true; }, - onSubmitForm() { + onSubmitForm(event) { + event.preventDefault(); + this.onSubmitEvent("POST", url + "/wizard/taxes", "type", this.taxes); }, From c0c75fce86792dd89fa1cb67aac4ca0d17cb2f57 Mon Sep 17 00:00:00 2001 From: Burak Civan Date: Wed, 29 Jun 2022 12:16:27 +0300 Subject: [PATCH 2/7] unused classname ejected --- resources/views/banking/reconciliations/create.blade.php | 2 +- resources/views/banking/reconciliations/edit.blade.php | 2 +- resources/views/common/import/create.blade.php | 2 +- resources/views/components/form/accordion/index.blade.php | 2 -- resources/views/components/form/section/index.blade.php | 2 -- resources/views/components/show/accordion/index.blade.php | 4 +--- 6 files changed, 4 insertions(+), 10 deletions(-) diff --git a/resources/views/banking/reconciliations/create.blade.php b/resources/views/banking/reconciliations/create.blade.php index 2438d2659..6cfcb8a90 100644 --- a/resources/views/banking/reconciliations/create.blade.php +++ b/resources/views/banking/reconciliations/create.blade.php @@ -247,7 +247,7 @@ -