Skip to content

Commit

Permalink
[TASK] Add styleguide example for inline+collapseAll+date combo
Browse files Browse the repository at this point in the history
The issue reported in #93743 seems to
not be reproducible in main, the datepicker
works even when "collapseAll=true" (and
"collapseAll=true") is set in the TCA.

To easily reproduce the scenario,
a new styleguide TCA element
"Form engine - inline expand single - inline_2"
is introduced and added as inline relation
to "Form engine - inline expand single".

The inline elements are dateTime inputs.

Resolves: #93743
Releases: main
Change-Id: I74da9da60a7b79213cae7d4b6b8c327972c2652a
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/84490
Tested-by: core-ci <typo3@b13.com>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Georg Ringer <georg.ringer@gmail.com>
Reviewed-by: Georg Ringer <georg.ringer@gmail.com>
  • Loading branch information
fe-hicking authored and georgringer committed Jun 13, 2024
1 parent 0bac4e7 commit beadfeb
Show file tree
Hide file tree
Showing 2 changed files with 137 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -86,11 +86,25 @@
],
],

'inline_2' => [
'label' => 'inline_2',
'config' => [
'type' => 'inline',
'foreign_table' => 'tx_styleguide_inline_expandsingle_inline_2_child',
'foreign_field' => 'parentid',
'foreign_table_field' => 'parenttable',
'appearance' => [
'collapseAll' => true,
'expandSingle' => true,
'newRecordLinkAddTitle' => true,
],
],
],
],

'types' => [
'0' => [
'showitem' => 'inline_1',
'showitem' => 'inline_1, inline_2',
],
],

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,122 @@
<?php

return [
'ctrl' => [
'title' => 'Form engine - inline expand single - inline_2',
'label' => 'uid',
'iconfile' => 'EXT:styleguide/Resources/Public/Icons/tx_styleguide.svg',
'tstamp' => 'tstamp',
'crdate' => 'crdate',
'delete' => 'deleted',
'sortby' => 'sorting',
'languageField' => 'sys_language_uid',
'transOrigPointerField' => 'l10n_parent',
'transOrigDiffSourceField' => 'l10n_diffsource',
'translationSource' => 'l10n_source',
'enablecolumns' => [
'disabled' => 'hidden',
],
'security' => [
'ignorePageTypeRestriction' => true,
],
],

'columns' => [
'sys_language_uid' => [
'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.language',
'config' => [
'type' => 'language',
],
],
'l10n_parent' => [
'displayCond' => 'FIELD:sys_language_uid:>:0',
'label' => 'Translation parent',
'config' => [
'type' => 'select',
'renderType' => 'selectSingle',
'items' => [
['label' => '', 'value' => 0],
],
'foreign_table' => 'tx_styleguide_inline_expandsingle_inline_2_child',
'foreign_table_where' => 'AND {#tx_styleguide_inline_expandsingle_inline_2_child}.{#pid}=###CURRENT_PID### AND {#tx_styleguide_inline_expandsingle_inline_2_child}.{#sys_language_uid} IN (-1,0)',
'default' => 0,
],
],
'l10n_source' => [
'displayCond' => 'FIELD:sys_language_uid:>:0',
'label' => 'Translation source',
'config' => [
'type' => 'select',
'renderType' => 'selectSingle',
'items' => [
['label' => '', 'value' => 0],
],
'foreign_table' => 'tx_styleguide_inline_expandsingle_inline_2_child',
'foreign_table_where' => 'AND {#tx_styleguide_inline_expandsingle_inline_2_child}.{#pid}=###CURRENT_PID### AND {#tx_styleguide_inline_expandsingle_inline_2_child}.{#uid}!=###THIS_UID###',
'default' => 0,
],
],
'l10n_diffsource' => [
'config' => [
'type' => 'passthrough',
],
],
'hidden' => [
'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.hidden',
'config' => [
'type' => 'check',
'default' => '0',
],
],

'parentid' => [
'config' => [
'type' => 'passthrough',
],
],
'parenttable' => [
'config' => [
'type' => 'passthrough',
],
],

'inputdatetime_1' => [
'label' => 'inputdatetime_1',
'description' => 'format=date',
'config' => [
'type' => 'datetime',
'format' => 'date',
],
],
'inputdatetime_2' => [
'label' => 'inputdatetime_2',
'description' => 'dbType=date format=date',
'config' => [
'type' => 'datetime',
'dbType' => 'date',
'format' => 'date',
],
],
'inputdatetime_3' => [
'label' => 'inputdatetime_3',
'description' => 'format=datetime eval=datetime',
'config' => [
'type' => 'datetime',
'dbType' => 'datetime',
],
],
],

'types' => [
'0' => [
'showitem' => '
--div--;tab1,
inputdatetime_1, inputdatetime_2,
--div--;tab2,
inputdatetime_3,
',
],

],

];

0 comments on commit beadfeb

Please sign in to comment.