[TASK] Always show fieldname in recordlist field selectbox 01/43501/2
authorBenjamin Kott <benjamin.kott@wfp2.com>
Wed, 23 Sep 2015 11:31:38 +0000 (13:31 +0200)
committerChristian Kuhn <lolli@schwarzbu.ch>
Wed, 23 Sep 2015 13:53:21 +0000 (15:53 +0200)
Resolves: #70040
Releases: master
Change-Id: Ied6d0f5fedd0c612b4f5952012aede3c1b4e1a4a
Reviewed-on: http://review.typo3.org/43501
Reviewed-by: Georg Ringer <georg.ringer@gmail.com>
Tested-by: Georg Ringer <georg.ringer@gmail.com>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
typo3/sysext/recordlist/Classes/RecordList/DatabaseRecordList.php

index 3a221b9..fed6501 100644 (file)
@@ -1706,13 +1706,13 @@ class DatabaseRecordList extends AbstractDatabaseRecordList {
                                $checked = '';
                        }
                        // Field label
-                       $fL = is_array($GLOBALS['TCA'][$table]['columns'][$fieldName])
+                       $fieldLabel = is_array($GLOBALS['TCA'][$table]['columns'][$fieldName])
                                ? rtrim($lang->sL($GLOBALS['TCA'][$table]['columns'][$fieldName]['label']), ':')
-                               : '[' . $fieldName . ']';
+                               : '';
                        $checkboxes[] = '<tr><td class="col-checkbox"><input type="checkbox" id="check-' . $fieldName . '" name="displayFields['
                                . $table . '][]" value="' . $fieldName . '"' . $checked
                                . ($fieldName === $this->fieldArray[0] ? ' disabled="disabled"' : '') . '></td><td class="col-title">'
-                               . '<label class="label-block" for="check-' . $fieldName . '">' . htmlspecialchars($fL) . '</label></td></tr>';
+                               . '<label class="label-block" for="check-' . $fieldName . '">' . htmlspecialchars($fieldLabel) . ' <span class="text-muted text-monospace">[' . htmlspecialchars($fieldName) . ']</span></label></td></tr>';
                }
                // Table with the field selector::
                $content = $formElements[0] . '