Project

General

Profile

Actions

Bug #104487

open

checkboxToggle doesn't apply `inline` keyword

Added by Thomas Rawiel about 21 hours ago.

Status:
New
Priority:
Should have
Assignee:
-
Category:
Backend User Interface
Target version:
-
Start date:
2024-07-26
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
12
PHP Version:
8.3
Tags:
Complexity:
no-brainer
Is Regression:
Sprint Focus:

Description

Using the property cols="inline" doesn't have an effect for checkboxes with renderType checkboxToggle.

\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTCAcolumns('tt_content', [
        'checkboxes' => [
            'exclude' => false,
            'label' => 'Checkbox Default',
            'config' => [
                'type' => 'check',
                'cols' => 'inline',
                'items' => [
                    ['label' => 'checkbox item',],
                    ['label' => 'checkbox item',],
                    ['label' => 'checkbox item',],
                    ['label' => 'checkbox item',],
                ],
            ],
        ],
        'checkboxes2' => [
            'exclude' => false,
            'label' => 'Checkbox Toggle',
            'config' => [
                'type' => 'check',
                'renderType' => 'checkboxToggle',
                'cols' => 'inline',
                'items' => [
                    ['label' => 'checkbox item',],
                    ['label' => 'checkbox item',],
                    ['label' => 'checkbox item',],
                    ['label' => 'checkbox item',],
                ],
            ],
        ],
        'checkboxes3' => [
            'exclude' => false,
            'label' => 'Checkbox Labeled Toggle',
            'config' => [
                'type' => 'check',
                'renderType' => 'checkboxLabeledToggle',
                'cols' => 'inline',
                'items' => [
                    ['label' => 'checkbox item', 'labelChecked' => 'Active', 'labelUnchecked' => 'Inactive'],
                    ['label' => 'checkbox item', 'labelChecked' => 'Active', 'labelUnchecked' => 'Inactive'],
                    ['label' => 'checkbox item', 'labelChecked' => 'Active', 'labelUnchecked' => 'Inactive'],
                    ['label' => 'checkbox item', 'labelChecked' => 'Active', 'labelUnchecked' => 'Inactive'],
                ],
            ],
        ],
    ]);
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addToAllTCAtypes('tt_content', 'checkboxes,checkboxes2,checkboxes3');

Expectation: all checkboxes are displayed inline for every checkbox field.

In the class TYPO3\CMS\Backend\Form\Element\CheckboxToggleElement function renderSingleCheckboxElement the variable $inline is setup like in the other 2 checkbox classe but remains unused.

It seems that was removed here: https://review.typo3.org/c/Packages/TYPO3.CMS/+/78547

Suggested fix: either remove it for the other two as well or re-add it for checkboxToggle


Files

checkboxes_inline_test.jpg (52.7 KB) checkboxes_inline_test.jpg Output of the posted TCA code Thomas Rawiel, 2024-07-26 15:03

No data to display

Actions

Also available in: Atom PDF