[BUGFIX] Properly render hidden fields for IRRE records 05/59605/2
authorHelmut Hummel <typo3@helhum.io>
Fri, 1 Feb 2019 12:20:11 +0000 (13:20 +0100)
committerBenni Mack <benni@typo3.org>
Thu, 7 Mar 2019 17:22:48 +0000 (18:22 +0100)
Despite $resultArray['additionalHiddenFields'] being properly
set by the elements, this section is never evaluated
in InlineRecordContainer.

Evaluate content in this property and render the fields
in the HTML output.

Resolves: #87614
Releases: master, 9.5, 8.7
Change-Id: Idb45a906d3cb019e915c94df59fa215405cb1af3
Reviewed-on: https://review.typo3.org/c/59605
Reviewed-by: Andreas Wolf <andreas.wolf@typo3.org>
Reviewed-by: Benni Mack <benni@typo3.org>
Reviewed-by: Andreas Fernandez <a.fernandez@scripting-base.de>
Reviewed-by: Susanne Moog <susanne.moog@typo3.org>
Reviewed-by: Oliver Klee <typo3-coding@oliverklee.de>
Reviewed-by: Daniel Goerz <daniel.goerz@posteo.de>
Tested-by: TYPO3com <noreply@typo3.com>
Tested-by: Susanne Moog <susanne.moog@typo3.org>
Tested-by: Daniel Goerz <daniel.goerz@posteo.de>
Tested-by: Benni Mack <benni@typo3.org>
typo3/sysext/backend/Classes/Form/Container/InlineRecordContainer.php

index 75e9bab..0c216a8 100644 (file)
@@ -173,6 +173,8 @@ class InlineRecordContainer extends AbstractContainer
             // If this record should be shown collapsed
             $class = $data['isInlineChildExpanded'] ? 'panel-visible' : 'panel-collapsed';
         }
+        $hiddenFieldHtml = implode(LF, $resultArray['additionalHiddenFields'] ?? []);
+
         if ($inlineConfig['renderFieldsOnly']) {
             // Render "body" part only
             $html = $html . $combinationHtml;
@@ -195,7 +197,7 @@ class InlineRecordContainer extends AbstractContainer
                                                        ' . $this->renderForeignRecordHeader($data) . '
                                                </div>
                                        </div>
-                                       <div class="panel-collapse" id="' . htmlspecialchars($objectId) . '_fields">' . $html . $combinationHtml . '</div>
+                                       <div class="panel-collapse" id="' . htmlspecialchars($objectId) . '_fields">' . $html . $hiddenFieldHtml . $combinationHtml . '</div>
                                </div>';
         }