---
t3lib/class.t3lib_tceforms.php | 33 ++++++++++++++++++++++++++-------
1 files changed, 26 insertions(+), 7 deletions(-)
diff --git a/t3lib/class.t3lib_tceforms.php b/t3lib/class.t3lib_tceforms.php
index d511459..51e0028 100644
--- a/t3lib/class.t3lib_tceforms.php
+++ b/t3lib/class.t3lib_tceforms.php
@@ -1707,9 +1707,13 @@ class t3lib_TCEforms {
foreach ($selItems as $p) {
// Non-selectable element:
if (!strcmp($p[1], '--div--')) {
+ $selIcon = '';
+ if (isset($p[2]) && $p[2] != 'empty-emtpy') {
+ $selIcon = $this->getIconHtml($p[2]) ;
+ }
$tRows[] = '
';
} else {
// Selected or not by default:
@@ -1724,7 +1728,7 @@ class t3lib_TCEforms {
$selIcon = $p[2];
} else {
$selIcon = t3lib_iconWorks::getSpriteIcon('empty-empty');
- }
+ }
// Compile row:
$rowId = uniqid('select_checkbox_row_');
@@ -4668,7 +4672,6 @@ class t3lib_TCEforms {
switch ($fieldValue['config']['special']) {
case 'tables':
$temp_tc = array_keys($GLOBALS['TCA']);
- $descr = '';
foreach ($temp_tc as $theTableNames) {
if (!$GLOBALS['TCA'][$theTableNames]['ctrl']['adminOnly']) {
@@ -4698,8 +4701,15 @@ class t3lib_TCEforms {
$theTypes = $GLOBALS['TCA']['pages']['columns']['doktype']['config']['items'];
foreach ($theTypes as $theTypeArrays) {
+
// Icon:
- $icon = t3lib_iconWorks::mapRecordTypeToSpriteIconName('pages', array('doktype' => $theTypeArrays[1]));
+ $icon = 'empty-emtpy';
+ if ($theTypeArrays[1] != '--div--') {
+ $icon = t3lib_iconWorks::mapRecordTypeToSpriteIconName(
+ 'pages',
+ array('doktype' => $theTypeArrays[1])
+ );
+ }
// Item configuration:
$items[] = array(
@@ -4711,7 +4721,6 @@ class t3lib_TCEforms {
break;
case 'exclude':
$theTypes = t3lib_BEfunc::getExcludeFields();
- $descr = '';
foreach ($theTypes as $theTypeArrays) {
list($theTable, $theFullField) = explode(':', $theTypeArrays[1]);
@@ -4719,6 +4728,16 @@ class t3lib_TCEforms {
$theFieldParts = explode(';', $theFullField);
$theField = array_pop($theFieldParts);
+ // Add header if not yet set for table:
+ if (!array_key_exists ( $theTable, $items )){
+ $icon = t3lib_iconWorks::mapRecordTypeToSpriteIconName($theTable, array());
+ $items[$theTable] = array(
+ $this->sL($GLOBALS['TCA'][$theTable]['ctrl']['title']),
+ '--div--',
+ $icon,
+ );
+ }
+
// Add help text
$helpText = array();
$GLOBALS['LANG']->loadSingleTableDescription($theTable);
@@ -4729,7 +4748,8 @@ class t3lib_TCEforms {
// Item configuration:
$items[] = array(
- rtrim($theTypeArrays[0], ':') . ' (' . $theField . ')',
+ rtrim($GLOBALS['LANG']->sl($GLOBALS['TCA'][$theTable]['columns'][$theField]['label']), ':') .
+ ' (' . $theField . ')',
$theTypeArrays[1],
'empty-empty',
$helpText
@@ -4816,7 +4836,6 @@ class t3lib_TCEforms {
$modList = $fieldValue['config']['special'] == 'modListUser' ? $loadModules->modListUser : $loadModules->modListGroup;
if (is_array($modList)) {
- $descr = '';
foreach ($modList as $theMod) {
--