Commit d78ad9ea authored by Benni Mack's avatar Benni Mack Committed by Wouter Wolters
Browse files

[BUGFIX] Fix padding of FormEngine without tabs

There are two inconsistencies within FormEngine:

1) Styling of records without tabs (e.g. filemounts)
2) Invalid HTML structure within pre-loaded IRRE elements

The patch fixes both parts as they are connected to each
other.

Resolves: #64061
Releases: master
Change-Id: I5f7d93af9ec1269ef4b6d6b9098f41a0a68c6b47
Reviewed-on: http://review.typo3.org/35674

Reviewed-by: Andreas Fernandez's avatarAndreas Fernandez <a.fernandez@scripting-base.de>
Tested-by: Andreas Fernandez's avatarAndreas Fernandez <a.fernandez@scripting-base.de>
Reviewed-by: Wouter Wolters's avatarWouter Wolters <typo3@wouterwolters.nl>
Tested-by: Wouter Wolters's avatarWouter Wolters <typo3@wouterwolters.nl>
parent 9f0ff13d
......@@ -963,41 +963,38 @@ class FormEngine {
}
}
// Return the imploded $out_array:
// There were --div-- dividers around...
if ($out_sheet > 0) {
// Create parts array for the tab menu:
$parts = array();
foreach ($out_array as $idx => $sheetContent) {
$content = implode('', $sheetContent);
if ($content) {
// Wrap content (row) with table-tag, otherwise tab/sheet will be disabled (see getdynTabMenu() )
$content = '<table border="0" cellspacing="0" cellpadding="0" width="100%">' . $content . '</table>';
}
$parts[$idx] = array(
'label' => $out_array_meta[$idx]['title'],
'content' => $content,
'newline' => $out_array_meta[$idx]['newline']
);
}
if (count($parts) > 1) {
// Unset the current level of tab menus:
$this->popFromDynNestedStack('tab', $tabIdentStringMD5 . '-' . ($out_sheet + 1));
$output = $this->getDynTabMenu($parts, $tabIdentString);
} else {
// If there is only one tab/part there is no need to wrap it into the dynTab code
$output = isset($parts[0]) ? trim($parts[0]['content']) : '';
// Create parts array for the tab menu:
$parts = array();
foreach ($out_array as $idx => $sheetContent) {
$content = implode('', $sheetContent);
if ($content) {
// Wrap content (row) with table-tag, otherwise tab/sheet will be disabled (see getdynTabMenu() )
$content = '<table border="0" cellspacing="0" cellpadding="0" width="100%">' . $content . '</table>';
}
$output = '
<tr>
<td colspan="2">
' . $output . '
</td>
</tr>';
$parts[$idx] = array(
'label' => $out_array_meta[$idx]['title'],
'content' => $content,
'newline' => $out_array_meta[$idx]['newline']
);
}
if (count($parts) > 1) {
// Unset the current level of tab menus:
$this->popFromDynNestedStack('tab', $tabIdentStringMD5 . '-' . ($out_sheet + 1));
$output = $this->getDynTabMenu($parts, $tabIdentString);
} else {
// Only one tab, so just implode and wrap the background image (= tab container) around:
$output = implode('', $out_array[$out_sheet]);
// If there is only one tab/part there is no need to wrap it into the dynTab code
$output = isset($parts[0]) ? trim($parts[0]['content']) : '';
}
// Only one tab, so just implode and wrap the background image (= tab container) around:
if ($out_sheet === 0) {
$output = '<div class="typo3-dyntabmenu-divs">' . $output . '</div>';
}
$output = '
<tr>
<td colspan="2">
' . $output . '
</td>
</tr>';
return $output;
}
......
......@@ -18,8 +18,12 @@ TCEforms
// Special handling of Tabs within FormEngine
.typo3-TCEforms {
// Move dyntab inner padding into fieldset for horizontal HR
div.typo3-dyntabmenu-divs {
// Move dyntab inner padding into fieldset for horizontal HR (only when tabs are there)
.typo3-dyntabmenu-divs {
border-top: 1px solid @nav-tabs-border-color;
}
.typo3-dyntabmenu-tabs + .typo3-dyntabmenu-divs {
border-top: none;
padding: 0;
}
......
......@@ -9756,7 +9756,11 @@ fieldset[disabled] .t3-table .btn-checkbox-holder input[type=checkbox]:checked +
/* - - - - - - - - - - - - - - - - - - - - -
TCEforms
- - - - - - - - - - - - - - - - - - - - - */
.typo3-TCEforms div.typo3-dyntabmenu-divs {
.typo3-TCEforms .typo3-dyntabmenu-divs {
border-top: 1px solid #cccccc;
}
.typo3-TCEforms .typo3-dyntabmenu-tabs + .typo3-dyntabmenu-divs {
border-top: none;
padding: 0;
}
.typo3-TCEforms .c-tablayer div,
......
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