[BUGFIX] Abort submit if required fields are not filled 93/44693/2
authorAndreas Fernandez <a.fernandez@scripting-base.de>
Thu, 12 Nov 2015 14:08:27 +0000 (15:08 +0100)
committerAndreas Fernandez <typo3@scripting-base.de>
Thu, 12 Nov 2015 17:08:23 +0000 (18:08 +0100)
Resolves: #71497
Releases: master
Change-Id: I7f4d8336735c872ca049799a0844b827f5ab3ee6
Reviewed-on: https://review.typo3.org/44693
Reviewed-by: Andreas Allacher <andreas.allacher@gmx.at>
Tested-by: Andreas Allacher <andreas.allacher@gmx.at>
Reviewed-by: Michael Oehlhof <typo3@oehlhof.de>
Tested-by: Michael Oehlhof <typo3@oehlhof.de>
Reviewed-by: Mathias Schreiber <mathias.schreiber@wmdb.de>
Tested-by: Mathias Schreiber <mathias.schreiber@wmdb.de>
Reviewed-by: Andreas Fernandez <typo3@scripting-base.de>
Tested-by: Andreas Fernandez <typo3@scripting-base.de>
typo3/sysext/backend/Resources/Public/JavaScript/SplitButtons.js

index adceccc..287d923 100644 (file)
@@ -54,6 +54,10 @@ define(['jquery', 'TYPO3/CMS/Backend/Icons'], function($, Icons) {
 
                        // Disable submit buttons
                        $form.on('submit', function() {
+                               if ($form.find('.has-error').length > 0) {
+                                       return false;
+                               }
+
                                var $affectedButton,
                                        $splitButton = $me.closest('.t3js-splitbutton');