Review 10.4 Merged

65805[BUGFIX] Use dedicated property to hide newRecordLink button

Oli Bartsch CR +2 V +2 Easy +28 −1 updated 09/23/20, 07:17

Commit message

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.

Review

  • Code review CR +2

    Imported before Forger kept the single votes, the next import adds them.

  • Verified V +2

    Imported before Forger kept the single votes, the next import adds them.

Issues 2

Files 2