[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:TYPO3com <noreply@typo3.com> Tested-by:
Benni Mack <benni@typo3.org> Tested-by:
Georg Ringer <georg.ringer@gmail.com> Reviewed-by:
Benni Mack <benni@typo3.org> Reviewed-by:
Georg Ringer <georg.ringer@gmail.com>
Showing
- typo3/sysext/backend/Classes/Form/Container/InlineControlContainer.php 1 addition, 1 deletion...backend/Classes/Form/Container/InlineControlContainer.php
- typo3/sysext/core/Documentation/Changelog/master/Important-82489-UseDedicatedPropertyToHideNewRecordLinkButton.rst 27 additions, 0 deletions...t-82489-UseDedicatedPropertyToHideNewRecordLinkButton.rst
Please register or sign in to comment