From a26aed2a5036e648a19b2a346c3724a08afad7ff Mon Sep 17 00:00:00 2001 From: Ransom Date: Thu, 13 Feb 2020 15:25:57 -0500 Subject: [PATCH] Fixed saving bulk edit jobs in Firefox --- CHANGELOG.md | 4 ++++ composer.json | 2 +- .../bulkeditelementaction/BulkEditElementActionAsset.php | 2 +- .../bulkeditelementaction/dist/js/BulkEditModal.js | 1 + src/templates/elementactions/BulkEdit/_edit.twig | 2 +- 5 files changed, 8 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8956f51..e87033e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Bulk Edit Changelog +## 2.0.1 - 2020-02-13 +### Fixed +- Fixed problem with saving bulk edit jobs in Firefox + ## 2.0.0 - 2020-01-24 {warning} The FieldProcessorInterface has slightly changed to better support old versions of PHP. If you wrote your own FieldProcessor, diff --git a/composer.json b/composer.json index 4f2ad6f..dc73667 100644 --- a/composer.json +++ b/composer.json @@ -2,7 +2,7 @@ "name": "venveo/craft-bulkedit", "description": "Bulk edit entries", "type": "craft-plugin", - "version": "2.0.0", + "version": "2.0.1", "keywords": [ "craft", "cms", diff --git a/src/assetbundles/bulkeditelementaction/BulkEditElementActionAsset.php b/src/assetbundles/bulkeditelementaction/BulkEditElementActionAsset.php index 64db99f..eceaeab 100644 --- a/src/assetbundles/bulkeditelementaction/BulkEditElementActionAsset.php +++ b/src/assetbundles/bulkeditelementaction/BulkEditElementActionAsset.php @@ -16,7 +16,7 @@ class BulkEditElementActionAsset extends AssetBundle public function init() { // define the path that your publishable resources live - $this->sourcePath = "@venveo/bulkedit/assetbundles/bulkeditelementaction/dist"; + $this->sourcePath = __DIR__ . '/dist'; // define the dependencies $this->depends = [ diff --git a/src/assetbundles/bulkeditelementaction/dist/js/BulkEditModal.js b/src/assetbundles/bulkeditelementaction/dist/js/BulkEditModal.js index 2fbcc88..f446369 100644 --- a/src/assetbundles/bulkeditelementaction/dist/js/BulkEditModal.js +++ b/src/assetbundles/bulkeditelementaction/dist/js/BulkEditModal.js @@ -156,6 +156,7 @@ Craft.BulkEditModal = Garnish.Modal.extend( }, _handleFieldEditorSubmit: function(e) { + e.preventDefault(); this.$container.find('.submit').attr('disabled', 'disabled'); this.$container.find('.submit').addClass('disabled') const formValues = this.$container.find('#bulk-edit-values-modal').serializeArray(); diff --git a/src/templates/elementactions/BulkEdit/_edit.twig b/src/templates/elementactions/BulkEdit/_edit.twig index 9e1d374..8a484bb 100644 --- a/src/templates/elementactions/BulkEdit/_edit.twig +++ b/src/templates/elementactions/BulkEdit/_edit.twig @@ -20,7 +20,7 @@
Cancel
-
+
{% else %}

It doesn't look like there are any fields that support bulk editing on these elements.