From d2824c9f2acb3e15cf1cd616858d2979b47ae11d Mon Sep 17 00:00:00 2001 From: Oliver Bartsch <bo@cedev.de> Date: Thu, 24 Sep 2020 14:03:36 +0200 Subject: [PATCH] [BUGFIX] Remove wrongly introduced showNewRecordLink property With #82489 a condition, introduced in #71918, was changed as it misused the `['appearance']['enabledControls']['new']` property to hide the newRecordLink button while actually only the "new" button of inline records controls should be hidden. To provide the possibility to hide the newRecordLink, independent of the controls, a new property `showNewRecordLink` was introduced. This new property is however superfluous as the newRecordLink button can already be hidden by setting `['appearance']['levelLinksPosition']` to `none`. Therefore the newly introduced `showNewRecordLink` property along with the condition is removed and the RST is updated and moved to the correct directory. Resolves: #92397 Relates: #82489 Releases: master, 10.4 Change-Id: I49cf98c98a9df125f4fbf1737ccdacbf915fb683 Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/65846 Tested-by: TYPO3com <noreply@typo3.com> Tested-by: Benni Mack <benni@typo3.org> Reviewed-by: Benni Mack <benni@typo3.org> --- .../Classes/Form/Container/InlineControlContainer.php | 5 +---- ...489-UseDedicatedPropertyToHideNewRecordLinkButton.rst | 9 +++------ 2 files changed, 4 insertions(+), 10 deletions(-) rename typo3/sysext/core/Documentation/Changelog/{master => 10.4.x}/Important-82489-UseDedicatedPropertyToHideNewRecordLinkButton.rst (64%) diff --git a/typo3/sysext/backend/Classes/Form/Container/InlineControlContainer.php b/typo3/sysext/backend/Classes/Form/Container/InlineControlContainer.php index a563a384f95c..01dd9d02bd48 100644 --- a/typo3/sysext/backend/Classes/Form/Container/InlineControlContainer.php +++ b/typo3/sysext/backend/Classes/Form/Container/InlineControlContainer.php @@ -282,10 +282,7 @@ class InlineControlContainer extends AbstractContainer } // Render the level links (create new record): - $levelLinks = ''; - if (!isset($config['appearance']['showNewRecordLink']) || $config['appearance']['showNewRecordLink']) { - $levelLinks = $this->getLevelInteractionLink('newRecord', $nameObject . '-' . $foreign_table, $config); - } + $levelLinks = $this->getLevelInteractionLink('newRecord', $nameObject . '-' . $foreign_table, $config); $formGroupAttributes = [ 'class' => 'form-group', diff --git a/typo3/sysext/core/Documentation/Changelog/master/Important-82489-UseDedicatedPropertyToHideNewRecordLinkButton.rst b/typo3/sysext/core/Documentation/Changelog/10.4.x/Important-82489-UseDedicatedPropertyToHideNewRecordLinkButton.rst similarity index 64% rename from typo3/sysext/core/Documentation/Changelog/master/Important-82489-UseDedicatedPropertyToHideNewRecordLinkButton.rst rename to typo3/sysext/core/Documentation/Changelog/10.4.x/Important-82489-UseDedicatedPropertyToHideNewRecordLinkButton.rst index c4ef8973899d..0addc0a11afb 100644 --- a/typo3/sysext/core/Documentation/Changelog/master/Important-82489-UseDedicatedPropertyToHideNewRecordLinkButton.rst +++ b/typo3/sysext/core/Documentation/Changelog/10.4.x/Important-82489-UseDedicatedPropertyToHideNewRecordLinkButton.rst @@ -17,11 +17,8 @@ column. The property is therefore from now on only used for the controls section of each inline record. -To still enable extension authors to hide the `newRecordLink` button, independent -of the controls `new` button, a new property :php:`['appearance']['showNewRecordLink']` -is now available for TCA type `inline`. - -For backwards compatibility the `newRecordLink` button is only hidden if -`showNewRecordLink` is explicit set to :php:`FALSE`. If not set the button is shown. +To to hide the `newRecordLink` button, independent of the controls `new` button, +use the already existing property :php:`['appearance']['levelLinksPosition']` +with `none` as value. .. index:: Backend, TCA, ext:backend -- GitLab