Commit 3b29051e authored by Christian Kuhn's avatar Christian Kuhn Committed by Jan Helke
Browse files

[BUGFIX] FormEngine group element top/bottom buttons

The sort top/bottom buttons in group element no longer depend
on the number of selected items. This is inconvenient anyway
since these sorting buttons only appeared after saving when
a bunch of items was selected, but not immediately.
The patch additionally fixes a failing acceptance test.

Change-Id: Ice0d179e7c74c3a1227c727c672b40844d6852c8
Resolves: #79149
Related: #78899
Releases: master
Reviewed-on: https://review.typo3.org/51111

Tested-by: default avatarTYPO3com <no-reply@typo3.com>
Reviewed-by: Anja Leichsenring's avatarAnja Leichsenring <aleichsenring@ab-softlab.de>
Tested-by: Anja Leichsenring's avatarAnja Leichsenring <aleichsenring@ab-softlab.de>
Reviewed-by: Jan Helke's avatarJan Helke <typo3@helke.de>
Tested-by: Jan Helke's avatarJan Helke <typo3@helke.de>
parent c9d79db5
......@@ -383,7 +383,7 @@ class GroupElement extends AbstractFormElement
$html[] = '<div class="form-wizards-items">';
$html[] = '<div class="btn-group-vertical">';
if ($maxItems > 1 && $size >=5 && $selectedItemsCount >=5 && !$isDisabled && $showMoveIcons) {
if ($maxItems > 1 && $size >=5 && !$isDisabled && $showMoveIcons) {
$html[] = '<a href="#"';
$html[] = ' class="btn btn-default t3js-btn-moveoption-top"';
$html[] = ' data-fieldname="' . htmlspecialchars($elementName) . '"';
......@@ -408,7 +408,7 @@ class GroupElement extends AbstractFormElement
$html[] = $this->iconFactory->getIcon('actions-move-down', Icon::SIZE_SMALL)->render();
$html[] = '</a>';
}
if ($maxItems > 1 && $size >=5 && $selectedItemsCount >=5 && !$isDisabled && $showMoveIcons) {
if ($maxItems > 1 && $size >=5 && !$isDisabled && $showMoveIcons) {
$html[] = '<a href="#"';
$html[] = ' class="btn btn-default t3js-btn-moveoption-bottom"';
$html[] = ' data-fieldname="' . htmlspecialchars($elementName) . '"';
......
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