[FEATURE] Custom inline record creation link label 24/24924/2
authorAlexander Stehlik <alexander.stehlik@googlemail.com>
Mon, 21 Oct 2013 13:31:42 +0000 (15:31 +0200)
committerGeorg Ringer <georg.ringer@gmail.com>
Tue, 22 Oct 2013 03:23:57 +0000 (05:23 +0200)
Introduce a new TCA setting for columns of type "inline" called
[appearance][newRecordLinkTitle] for overwriting the label of the link
that adds a new inline record to the parent record.

Resolves: #53007
Releases: 6.2
Change-Id: Ia1275aab8eadfd516d0bb58e7704dfb37fecc7c3
Reviewed-on: https://review.typo3.org/24924
Reviewed-by: Georg Ringer
Tested-by: Georg Ringer
typo3/sysext/backend/Classes/Form/Element/InlineElement.php

index cc02f55..99c0450 100644 (file)
@@ -904,6 +904,8 @@ class InlineElement {
                                }
                                if (isset($conf['appearance']['newRecordLinkAddTitle']) && $conf['appearance']['newRecordLinkAddTitle']) {
                                        $titleAddon = ' ' . $GLOBALS['LANG']->sL($GLOBALS['TCA'][$conf['foreign_table']]['ctrl']['title'], TRUE);
+                               } elseif (isset($conf['appearance']['newRecordLinkTitle']) && strlen($conf['appearance']['newRecordLinkTitle'])) {
+                                       $title = $GLOBALS['LANG']->sL($conf['appearance']['newRecordLinkTitle'], TRUE);
                                }
                                break;
                        case 'localize':