[BUGFIX] Re-validate after remove IRRE element 99/45099/3
authorFrank Nägler <frank.naegler@typo3.org>
Wed, 2 Dec 2015 20:41:20 +0000 (21:41 +0100)
committerAnja Leichsenring <aleichsenring@ab-softlab.de>
Mon, 7 Dec 2015 10:49:50 +0000 (11:49 +0100)
Resolves: #72014
Releases: master
Change-Id: I035336ec841eef1bc2c8c7875a71f7df316f134e
Reviewed-on: https://review.typo3.org/45099
Reviewed-by: Armin Ruediger Vieweg <armin@v.ieweg.de>
Tested-by: Armin Ruediger Vieweg <armin@v.ieweg.de>
Reviewed-by: Georg Ringer <georg.ringer@gmail.com>
Tested-by: Georg Ringer <georg.ringer@gmail.com>
Reviewed-by: Daniel Goerz <ervaude@gmail.com>
Tested-by: Daniel Goerz <ervaude@gmail.com>
Reviewed-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Tested-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
typo3/sysext/backend/Resources/Public/JavaScript/FormEngineValidation.js
typo3/sysext/backend/Resources/Public/JavaScript/jsfunc.inline.js

index c763132..9cbb5af 100644 (file)
@@ -472,7 +472,7 @@ define(['jquery', 'TYPO3/CMS/Backend/FormEngine'], function ($, FormEngine) {
 
                $(FormEngineValidation.rulesSelector).each(function() {
                        var $field = $(this);
-                       if (!$field.closest('.t3js-flex-section-deleted').length) {
+                       if (!$field.closest('.t3js-flex-section-deleted, .t3js-inline-record-deleted').length) {
                                var newValue = FormEngineValidation.validateField($field);
                                if (newValue.length && $field.val() !== newValue) {
                                        $field.attr('value', newValue);
index bb75030..3939afa 100644 (file)
@@ -953,7 +953,9 @@ var inline = {
                }
 
                // Mark this container as deleted
-               TYPO3.jQuery('#' + this.escapeObjectId(objectId) + '_div').addClass('inlineIsDeletedRecord');
+               TYPO3.jQuery('#' + this.escapeObjectId(objectId) + '_div')
+                       .addClass('inlineIsDeletedRecord')
+                       .addClass('t3js-inline-record-deleted');
 
                // If the record is new and was never saved before, just remove it from DOM:
                if (this.isNewRecord(objectId) || options && options.forceDirectRemoval) {
@@ -1259,6 +1261,7 @@ var inline = {
        fadeAndRemove: function (element) {
                TYPO3.jQuery('#' + this.escapeObjectId(element)).fadeOut(200, function () {
                        TYPO3.jQuery(this).remove();
+                       TYPO3.FormEngine.Validation.validate();
                });
        },