[BUGFIX] Fix missing new record button with enabled useCombination 89/33289/2
authorMarc Bastian Heinrichs <typo3@mbh-software.de>
Thu, 17 Jul 2014 10:27:39 +0000 (12:27 +0200)
committerWouter Wolters <typo3@wouterwolters.nl>
Mon, 13 Oct 2014 10:48:38 +0000 (12:48 +0200)
Also add it if a record selector is shown.

Resolves: #60370
Related: #57488
Releases: master, 6.2
Change-Id: If4f34521310dc3f479d6c97cada082db91f668c3
Reviewed-on: http://review.typo3.org/33289
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Tested-by: Wouter Wolters <typo3@wouterwolters.nl>
typo3/sysext/backend/Classes/Form/Element/InlineElement.php

index e49ce28..1a8c143 100644 (file)
@@ -173,7 +173,6 @@ class InlineElement {
                        return FALSE;
                }
                $item = '';
-               $levelLinks = '';
                $localizationLinks = '';
                // Count the number of processed inline elements
                $this->inlineCount++;
@@ -284,10 +283,10 @@ class InlineElement {
                        }
                        $selectorBox = $this->renderPossibleRecordsSelector($possibleRecords, $config, $uniqueIds);
                        $item .= $selectorBox . $localizationLinks;
-               // Render the level links (create new record):
-               } else {
-                       $levelLinks = $this->getLevelInteractionLink('newRecord', $nameObject . self::Structure_Separator . $foreign_table, $config);
                }
+               // Render the level links (create new record):
+               $levelLinks = $this->getLevelInteractionLink('newRecord', $nameObject . self::Structure_Separator . $foreign_table, $config);
+
                // Wrap all inline fields of a record with a <div> (like a container)
                $item .= '<div id="' . $nameObject . '">';
                // Define how to show the "Create new record" link - if there are more than maxitems, hide it