[BUGFIX] Fix formEngine SelectCheckBox word-wrap on small screens 00/58400/2
authorJosef Glatz <josefglatz@gmail.com>
Wed, 26 Sep 2018 17:00:09 +0000 (19:00 +0200)
committerFrank Naegler <frank.naegler@typo3.org>
Thu, 27 Sep 2018 13:19:52 +0000 (15:19 +0200)
This patch enables word-wrap in a form element `type=select`
with `renderType=selectCheckBox` on small screen devices like
tablet portrait. It prevents the list from sticking out of the right
viewport border.

Only the case when TYPO3_CONF_VARS/BE/debug = false was
taken into account.

Resolves: #86391
Releases: master
Change-Id: Ia894b0a7481feb7a083bc583ff037063093f4e9c
Reviewed-on: https://review.typo3.org/58400
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Georg Ringer <georg.ringer@gmail.com>
Tested-by: Georg Ringer <georg.ringer@gmail.com>
Reviewed-by: Georg Tiefenbrunn <georg.tiefenbrunn@gmail.com>
Tested-by: Georg Tiefenbrunn <georg.tiefenbrunn@gmail.com>
Reviewed-by: Michael Oehlhof <typo3@oehlhof.de>
Reviewed-by: Frank Naegler <frank.naegler@typo3.org>
Tested-by: Frank Naegler <frank.naegler@typo3.org>
typo3/sysext/backend/Classes/Form/Element/SelectCheckBoxElement.php

index 7b7ac43..c2f8af8 100644 (file)
@@ -195,7 +195,7 @@ class SelectCheckBoxElement extends AbstractFormElement
                         $tableRows[] =        '<label class="label-block" for="' . $item['id'] . '">' . $item['icon'] . '</label>';
                         $tableRows[] =    '</td>';
                         $tableRows[] =    '<td class="col-title">';
-                        $tableRows[] =        '<label class="label-block" for="' . $item['id'] . '">' . htmlspecialchars($this->appendValueToLabelInDebugMode($item['title'], $item['value']), ENT_COMPAT, 'UTF-8', false) . '</label>';
+                        $tableRows[] =        '<label class="label-block nowrap-disabled" for="' . $item['id'] . '">' . htmlspecialchars($this->appendValueToLabelInDebugMode($item['title'], $item['value']), ENT_COMPAT, 'UTF-8', false) . '</label>';
                         $tableRows[] =    '</td>';
                         $tableRows[] =    '<td class="text-right">' . $item['help'] . '</td>';
                         $tableRows[] = '</tr>';