Index: t3lib/class.t3lib_tceforms.php
===================================================================
--- t3lib/class.t3lib_tceforms.php (revision 9180)
+++ t3lib/class.t3lib_tceforms.php (revision )
@@ -597,7 +597,7 @@
}
}
} elseif($theField=='--palette--') {
- if ($parts[2] && !isset($this->palettesRendered[$this->renderDepth][$table][$parts[2]])) {
+ if ($parts[2] && !isset($this->palettesRendered[$this->renderDepth][$table][$parts[2]])) {
// render a 'header' if not collapsed
if ($TCA[$table]['palettes'][$parts[2]]['canNotCollapse'] AND $parts[1]) {
$out_array[$out_sheet][$out_pointer].=$this->getPaletteFields($table,$row,$parts[2],$this->sL($parts[1]));
@@ -755,28 +755,40 @@
// Put palette together if there are fields in it:
if (count($parts)) {
+
+ $realFields = 0;
+
+ foreach($parts as $part) {
+ if($part['NAME'] != '--linebreak--') {
+ $realFields++;
+ }
+ }
+
+ if($realFields > 0) {
+
- if ($header) {
- $out .= $this->intoTemplate(
- array('HEADER' => htmlspecialchars($header)),
- $this->palFieldTemplateHeader
- );
- }
+ if ($header) {
+ $out .= $this->intoTemplate(
+ array('HEADER' => htmlspecialchars($header)),
+ $this->palFieldTemplateHeader
+ );
+ }
- $collapsed = $this->isPalettesCollapsed($table,$palette);
+ $collapsed = $this->isPalettesCollapsed($table,$palette);
- $thePalIcon = '';
- if ($collapsed && $collapsedHeader !== NULL) {
- list($thePalIcon,) = $this->wrapOpenPalette(t3lib_iconWorks::getSpriteIcon('actions-system-options-view', array('title' => htmlspecialchars($this->getLL('l_moreOptions')))), $table, $row, $palette, 1);
- $thePalIcon = '' . $thePalIcon . $collapsedHeader . '';
- }
+ $thePalIcon = '';
+ if ($collapsed && $collapsedHeader !== NULL) {
+ list($thePalIcon,) = $this->wrapOpenPalette(t3lib_iconWorks::getSpriteIcon('actions-system-options-view', array('title' => htmlspecialchars($this->getLL('l_moreOptions')))), $table, $row, $palette, 1);
+ $thePalIcon = '' . $thePalIcon . $collapsedHeader . '';
+ }
- $paletteHtml = $this->wrapPaletteField($this->printPalette($parts), $table, $row ,$palette, $collapsed);
+ $paletteHtml = $this->wrapPaletteField($this->printPalette($parts), $table, $row ,$palette, $collapsed);
- $out .= $this->intoTemplate(
- array('PALETTE' => $thePalIcon . $paletteHtml),
- $this->palFieldTemplate
- );
- }
+ $out .= $this->intoTemplate(
+ array('PALETTE' => $thePalIcon . $paletteHtml),
+ $this->palFieldTemplate
+ );
+ }
+ }
return $out;
}