[BUGFIX] Null placeholder initialization in inline expand 42/51542/2
authorChristian Kuhn <lolli@schwarzbu.ch>
Sun, 5 Feb 2017 12:15:48 +0000 (13:15 +0100)
committerBenni Mack <benni@typo3.org>
Sun, 5 Feb 2017 21:33:55 +0000 (22:33 +0100)
Opening a collapsed inline relation containing null placeholders
does not correctly initialize and both the value field as well as
the placeholder field are shown.
Easily reproducible with a FAL relation on a page record.
Fix JavaScript to initialize correctly.

Change-Id: I27b52b9f69beb24d0309422cbcf2b67cc8190e07
Resolves: #79632
Related: #79440
Releases: master
Reviewed-on: https://review.typo3.org/51542
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Alex Kellner <alexander.kellner@einpraegsam.net>
Tested-by: Alex Kellner <alexander.kellner@einpraegsam.net>
Reviewed-by: Bjoern Jacob <bjoern.jacob@tritum.de>
Tested-by: Bjoern Jacob <bjoern.jacob@tritum.de>
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Reviewed-by: Benni Mack <benni@typo3.org>
Tested-by: Benni Mack <benni@typo3.org>
typo3/sysext/backend/Resources/Public/JavaScript/FormEngine.js

index b75b302..659601f 100644 (file)
@@ -921,9 +921,9 @@ define(['jquery',
                        // depending on whether checkbox is checked or not
                        var $checkbox = $(this).find('input[type="checkbox"]');
                        if ($checkbox.attr('checked')) {
-                               $(this).closest('.t3js-formengine-field-item').find('.t3js-formengine-placeholder-placeholder').toggle();
+                               $(this).closest('.t3js-formengine-field-item').find('.t3js-formengine-placeholder-placeholder').hide();
                        } else {
-                               $(this).closest('.t3js-formengine-field-item').find('.t3js-formengine-placeholder-formfield').toggle();
+                               $(this).closest('.t3js-formengine-field-item').find('.t3js-formengine-placeholder-formfield').hide();
                        }
                });
        };