Commit 2bd727f1 authored by Mathias Brodala's avatar Mathias Brodala Committed by Christian Kuhn
Browse files

[FEATURE] Add option to hide group field move buttons

This adds an TCA option to explicitely hide the move buttons of
TCA "group" fields. As of now these icons can only be hidden
automatically if "maxitems" is set to 1.

Resolves: #67056
Releases: master
Change-Id: I01e65eaeb977dadff0be84593962d8543c8545dd
Reviewed-on: http://review.typo3.org/39631

Reviewed-by: Andreas Wolf's avatarAndreas Wolf <andreas.wolf@typo3.org>
Tested-by: Andreas Wolf's avatarAndreas Wolf <andreas.wolf@typo3.org>
Reviewed-by: Christian Kuhn's avatarChristian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn's avatarChristian Kuhn <lolli@schwarzbu.ch>
parent 7c5642c6
......@@ -175,7 +175,7 @@ class GroupElement extends AbstractFormElement {
'size' => $size,
'allowed' => $allowed,
'disallowed' => $disallowed,
'dontShowMoveIcons' => $maxitems <= 1,
'dontShowMoveIcons' => isset($config['hideMoveIcons']) || $maxitems <= 1,
'autoSizeMax' => MathUtility::forceIntegerInRange($config['autoSizeMax'], 0),
'maxitems' => $maxitems,
'style' => isset($config['selectedListStyle'])
......@@ -227,7 +227,7 @@ class GroupElement extends AbstractFormElement {
// Creating the element:
$params = array(
'size' => $size,
'dontShowMoveIcons' => $maxitems <= 1,
'dontShowMoveIcons' => isset($config['hideMoveIcons']) || $maxitems <= 1,
'autoSizeMax' => MathUtility::forceIntegerInRange($config['autoSizeMax'], 0),
'maxitems' => $maxitems,
'style' => isset($config['selectedListStyle'])
......@@ -295,7 +295,7 @@ class GroupElement extends AbstractFormElement {
// Creating the element:
$params = array(
'size' => $size,
'dontShowMoveIcons' => $maxitems <= 1,
'dontShowMoveIcons' => isset($config['hideMoveIcons']) || $maxitems <= 1,
'autoSizeMax' => MathUtility::forceIntegerInRange($config['autoSizeMax'], 0),
'maxitems' => $maxitems,
'style' => isset($config['selectedListStyle'])
......
===================================================================
Feature: #67056 - Add option to disable move buttons TCA group type
===================================================================
Description
===========
The move buttons of the TCA type ``group`` can now be explicitly disabled with the
``hideMoveIcons`` option. Before these icons where only automatically removed if
``maxitems`` was set to 1.
.. code-block:: [php]
'options' => array(
'label' => 'Options',
'config' => array(
'type' => 'group',
'internal_type' => 'db',
'allowed' => 'pages',
'maxitems' => 9999,
'hideMoveIcons' => TRUE,
),
),
Impact
======
Move buttons can now always be hidden for ``group`` fields
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment