From 8316c98a472d9f8990f9967bd8ba11423bb5d68d Mon Sep 17 00:00:00 2001 From: Benjamin Mack <benni@b13.de> Date: Fri, 25 Jul 2014 20:48:09 +0200 Subject: [PATCH] [CLEANUP] Remove hardcoded valign="top" in FormEngine MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit There are several places in the TYPO3 Form Engine where the styling information about tables (valign) is hard-coded. The patch removes that, styling is done via CSS. Resolves: #56261 Releases: 6.3 Change-Id: Ibcc9bb7df3cf05e791eae7f16d91e0afa60ab65d Reviewed-on: http://review.typo3.org/27833 Reviewed-by: Stefan Neufeind <typo3.neufeind@speedpartner.de> Reviewed-by: Marcin SÄ…gol <marcin@soee.pl> Reviewed-by: Oliver Klee <typo3-coding@oliverklee.de> Reviewed-by: Susanne Moog <typo3@susannemoog.de> Tested-by: Susanne Moog <typo3@susannemoog.de> Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl> Tested-by: Wouter Wolters <typo3@wouterwolters.nl> --- typo3/sysext/backend/Classes/Form/FormEngine.php | 10 +++++----- .../Resources/Private/Templates/FormEngine.html | 8 ++++---- .../Public/Css/structure/element_tceforms.css | 5 +++++ 3 files changed, 14 insertions(+), 9 deletions(-) diff --git a/typo3/sysext/backend/Classes/Form/FormEngine.php b/typo3/sysext/backend/Classes/Form/FormEngine.php index e0a0da7210d6..f42dfadc7ad9 100644 --- a/typo3/sysext/backend/Classes/Form/FormEngine.php +++ b/typo3/sysext/backend/Classes/Form/FormEngine.php @@ -4359,7 +4359,7 @@ TBE_EDITOR.customEvalFunctions[\'' . $evalData . '\'] = function(value) { $hookObject->dbFileIcons_postProcess($params, $selector, $thumbnails, $icons, $rightbox, $fName, $uidList, $additionalParams, $this); } } - $str = '<table border="0" cellpadding="0" cellspacing="0" width="1"> + $str = '<table border="0" cellpadding="0" cellspacing="0" width="1" class="t3-form-field-group-file"> ' . ($params['headers'] ? ' <tr> <td>' . $this->wrapLabels($params['headers']['selector']) . '</td> @@ -4368,14 +4368,14 @@ TBE_EDITOR.customEvalFunctions[\'' . $evalData . '\'] = function(value) { <td>' . ($params['thumbnails'] ? $this->wrapLabels($params['headers']['items']) : '') . '</td> </tr>' : '') . ' <tr> - <td valign="top">' . $selector . $thumbnails; + <td>' . $selector . $thumbnails; if (!$params['noList'] && $params['info'] !== '') { $str .= '<span class="filetypes">' . $this->wrapLabels($params['info']) . '</span>'; } $str .= '</td> - <td valign="top" class="icons">' . implode('<br />', $icons['L']) . '</td> - <td valign="top" class="icons">' . implode('<br />', $icons['R']) . '</td> - <td valign="top">' . $rightbox . '</td> + <td class="icons">' . implode('<br />', $icons['L']) . '</td> + <td class="icons">' . implode('<br />', $icons['R']) . '</td> + <td>' . $rightbox . '</td> </tr> </table>'; // Creating the hidden field which contains the actual value as a comma list. diff --git a/typo3/sysext/backend/Resources/Private/Templates/FormEngine.html b/typo3/sysext/backend/Resources/Private/Templates/FormEngine.html index 65dd653d1744..75cafdedefdb 100644 --- a/typo3/sysext/backend/Resources/Private/Templates/FormEngine.html +++ b/typo3/sysext/backend/Resources/Private/Templates/FormEngine.html @@ -13,7 +13,7 @@ <td colspan="2" class="formField-header"><span style="color:###FONTCOLOR_HEAD###;"###CLASSATTR_4###><strong>###FIELD_NAME###</strong></span></td> </tr> <tr ###BGCOLOR######CLASSATTR_1###> - <td colspan="2" class="formField-field" valign="top"> + <td colspan="2" class="formField-field"> <span class="t3-form-field-container"> <img name="cm_###FIELD_TABLE###_###FIELD_ID###_###FIELD_FIELD###" src="clear.gif" class="t3-TCEforms-contentchangedImg" alt="" /> <img name="req_###FIELD_TABLE###_###FIELD_ID###_###FIELD_FIELD###" src="clear.gif" class="t3-TCEforms-reqImg" alt="" /> @@ -26,7 +26,7 @@ </td> </tr> <tr> - <td colspan="2" class="formField-field" valign="top"> + <td colspan="2" class="formField-field"> ###FIELD_PAL_LINK_ICON### </td> </tr> @@ -53,14 +53,14 @@ <!-- ###PALETTE_FIELDTEMPLATE### begin --> <tr ###BGCOLOR######CLASSATTR_1###> - <td colspan="2" nowrap="nowrap" valign="top">###FIELD_PALETTE###</td> + <td colspan="2" nowrap="nowrap">###FIELD_PALETTE###</td> </tr> <!-- ###PALETTE_FIELDTEMPLATE### end --> <!-- ###PALETTE_FIELDTEMPLATE_HEADER### begin --> <tr ###BGCOLOR_HEAD######CLASSATTR_2###> - <td colspan="2" nowrap="nowrap" valign="top" class="palette-header"><strong>###FIELD_HEADER###</strong></td> + <td colspan="2" nowrap="nowrap" class="palette-header"><strong>###FIELD_HEADER###</strong></td> </tr> <!-- ###PALETTE_FIELDTEMPLATE_HEADER### end --> diff --git a/typo3/sysext/t3skin/Resources/Public/Css/structure/element_tceforms.css b/typo3/sysext/t3skin/Resources/Public/Css/structure/element_tceforms.css index f1209729f41c..cd432cdeb47b 100644 --- a/typo3/sysext/t3skin/Resources/Public/Css/structure/element_tceforms.css +++ b/typo3/sysext/t3skin/Resources/Public/Css/structure/element_tceforms.css @@ -187,6 +187,7 @@ select option.c-divider { position: relative; padding-left: 10px; padding-right: 10px; + vertical-align: top; } .typo3-TCEforms .formField, @@ -217,6 +218,10 @@ select option.c-divider { padding: 5px 0 5px 0; } +.t3-form-field-group-file tr:last-child td { + vertical-align: top; +} + .typo3-TCEforms td.icons { padding: 2px; } -- GitLab