Project

General

Profile

Actions

Bug #104487

closed

checkboxToggle doesn't apply `inline` keyword

Added by Thomas Rawiel 4 months ago. Updated about 1 month ago.

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

100%

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
Actions #1

Updated by Gerrit Code Review 4 months ago

  • Status changed from New to Under Review

Patch set 1 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/85439

Actions #2

Updated by Gerrit Code Review 4 months ago

Patch set 2 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/85439

Actions #3

Updated by Gerrit Code Review 4 months ago

Patch set 3 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/85439

Actions #4

Updated by Gerrit Code Review 4 months ago

Patch set 4 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/85439

Actions #5

Updated by Corinne van der Zande 4 months ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #6

Updated by Gerrit Code Review 4 months ago

  • Status changed from Resolved to Under Review

Patch set 1 for branch 12.4 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/85504

Actions #7

Updated by Corinne van der Zande 4 months ago

  • Status changed from Under Review to Resolved
Actions #8

Updated by Benni Mack about 1 month ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF