Skip to content

Commit

Permalink
[BUGFIX] Remove wrongly introduced showNewRecordLink property
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
o-ba authored and bmack committed Sep 24, 2020
1 parent cf61be1 commit d2824c9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 10 deletions.
Expand Up @@ -282,10 +282,7 @@ public function render()
}

// 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',
Expand Down
Expand Up @@ -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

0 comments on commit d2824c9

Please sign in to comment.