Skip to content
Snippets Groups Projects
Commit 20658a44 authored by Oliver Bartsch's avatar Oliver Bartsch Committed by Georg Ringer
Browse files

[BUGFIX] Use dedicated property to hide newRecordLink button

Since #71918 the property ['appearance']['enabledControls']['new']
is misused to hide the newRecordLink button of TCA=inline.

This is incorrect because according to documentation enabledControls
only manages the controls, shown in the header of each inline record.
This makes sense for use-cases where e.g. an inline column has
maxitems=1 set. Therefore the control to create a new inline record
afterwards is not needed. The newRecordLink is however definitely
needed to create at least this one inline record.

Furthermore ['enabledControls']['new'] is the only enabledControls
property used in InlineControlContainer, which also indicates its
misuse there.

This check is therefore now replaced by a new dedicated property
`showNewRecordLink`, so it is still possible for extension authors to
hide the newRecordLink independent of the new button in the inline
records controls.

For backwards compatibility the newRecordLink is only hidden if the
`showNewRecordLink` is explicit set to FALSE. If not set the
newRecordLink is shown.

Resolves: #82489
Related: #71918
Releases: master, 10.4
Change-Id: Ic504ff95ff30804d86a686d71922622c19b0c859
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/65701


Tested-by: default avatarTYPO3com <noreply@typo3.com>
Tested-by: default avatarBenni Mack <benni@typo3.org>
Tested-by: default avatarGeorg Ringer <georg.ringer@gmail.com>
Reviewed-by: default avatarBenni Mack <benni@typo3.org>
Reviewed-by: default avatarGeorg Ringer <georg.ringer@gmail.com>
parent 77efc711
Branches
Tags
No related merge requests found
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment