Index: t3lib/class.t3lib_tceforms.php =================================================================== --- t3lib/class.t3lib_tceforms.php (Revision 7660) +++ t3lib/class.t3lib_tceforms.php (Arbeitskopie) @@ -4951,20 +4951,34 @@ * @param array The palette array to print * @return string HTML output */ - function printPalette($palArr) { + function printPalette($palArr) { + $fieldAttributes = $labelAttributes = ''; // Init color/class attributes: - $ccAttr2 = $this->colorScheme[2] ? ' bgcolor="'.$this->colorScheme[2].'"' : ''; - $ccAttr2.= $this->classScheme[2] ? ' class="'.$this->classScheme[2].'"' : ''; - $ccAttr4 = $this->colorScheme[4] ? ' style="color:'.$this->colorScheme[4].'"' : ''; - $ccAttr4.= $this->classScheme[4] ? ' class="'.$this->classScheme[4].'"' : ''; + if ($this->colorScheme[2]) { + $labelAttributes .= ' bgcolor="' . $this->colorScheme[2] . '"'; + } + if ($this->classScheme[2]) { + $labelAttributes .= ' class="t3-form-palette-field-label ' . $this->classScheme[2] . '"'; + } else { + $labelAttributes .= ' class="t3-form-palette-field-label"'; + } + + if ($this->colorScheme[4]) { + $fieldAttributes .= ' style="color: ' . $this->colorScheme[4] . '"'; + } + + if ($this->classScheme[4]) { + $fieldAttributes .= ' class="' . $this->classScheme[4] . '"'; + } + $row = 0; $hRow = $iRow = array(); $lastLineWasLinebreak = FALSE; - // Traverse palette fields and render them into table rows: - foreach($palArr as $content) { + // Traverse palette fields and render them into containers: + foreach ($palArr as $content) { if ($content['NAME'] === '--linebreak--') { if (!$lastLineWasLinebreak) { $row++; @@ -4972,43 +4986,28 @@ } } else { $lastLineWasLinebreak = FALSE; - $hRow[$row][] = '
'. - implode(' - ', $hRow[$i]) . ' - |
'. - implode(' - ', $iRow[$i]) . ' - |