[BUGFIX] Prevent closing a record after changes made with „toggle all“ 92/58392/4
authorJosef Glatz <josefglatz@gmail.com>
Tue, 25 Sep 2018 18:20:16 +0000 (20:20 +0200)
committerAndreas Fernandez <a.fernandez@scripting-base.de>
Thu, 27 Sep 2018 06:41:24 +0000 (08:41 +0200)
This patch prevents closing a form without showing the modal
to inform the backend user about unsaved changes if values of
an element with renderType `selectCheckBox` were changed
through a „toggle all“ checkbox.

Resolves: #86377
Releases: master, 8.7
Change-Id: I8a0ffd7ae0104739fdb66a1863e7012c0d30c84e
Reviewed-on: https://review.typo3.org/58392
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Jigal van Hemert <jigal.van.hemert@typo3.org>
Tested-by: Jigal van Hemert <jigal.van.hemert@typo3.org>
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Reviewed-by: Andreas Fernandez <a.fernandez@scripting-base.de>
Tested-by: Andreas Fernandez <a.fernandez@scripting-base.de>
typo3/sysext/backend/Resources/Public/JavaScript/FormEngine.js

index 42d5193..1ea5529 100644 (file)
@@ -828,6 +828,7 @@ define(['jquery',
       var checkIt = $checkboxes.length !== $table.find('.t3js-checkbox:checked').length;
       $checkboxes.prop('checked', checkIt);
       $checkbox.prop('checked', checkIt);
+      FormEngine.Validation.markFieldAsChanged($checkbox);
     });
     $(document).on('change', '.t3js-checkbox', function(e) {
       FormEngine.updateCheckboxState(this);