[BUGFIX] Missing "Toggle all" label is added to "Access Rights" tab 25/48525/5
authorNadir Sunar <dernadir@gmail.com>
Thu, 9 Jun 2016 09:48:49 +0000 (11:48 +0200)
committerSusanne Moog <typo3@susannemoog.de>
Tue, 14 Jun 2016 07:30:05 +0000 (09:30 +0200)
Access Right tab has been missing the label for the "toggle all" checkbox.
'<div class="checkbox">' is needed in order to avoid style issues,
when the checkbox is put under accordion element.
Also the title under single-table view is corrected
(check all => toggle all).

Resolves: #76540
Releases: master
Related: #76470

Change-Id: I4ba636e22891157b39b03279906c8f08e9ad7880
Reviewed-on: https://review.typo3.org/48525
Reviewed-by: Joerg Boesche <typo3@joergboesche.de>
Tested-by: Joerg Boesche <typo3@joergboesche.de>
Reviewed-by: Susanne Moog <typo3@susannemoog.de>
Tested-by: Susanne Moog <typo3@susannemoog.de>
Build/Resources/Public/Less/TYPO3/_element_table.less
typo3/sysext/backend/Classes/Form/Element/SelectCheckBoxElement.php
typo3/sysext/backend/Resources/Public/Css/backend.css
typo3/sysext/recordlist/Classes/RecordList/DatabaseRecordList.php

index ec3256a..140566b 100644 (file)
@@ -78,6 +78,13 @@ table {
        }
        > thead > tr {
                background-color: darken(@table-bg, 5%);
+                th.col-checkbox {
+                        + th.col-title {
+                                label {
+                                        margin-bottom: 0px;
+                                }
+                        }
+                }
                th,
                td {
                        border-bottom: 1px solid @table-border-color;
index 04b2d12..71b332a 100644 (file)
@@ -147,7 +147,7 @@ class SelectCheckBoxElement extends AbstractFormElement
                         $tableRows[] =    '<td class="col-title">';
                         $tableRows[] =        '<label class="label-block" for="' . $item['id'] . '">' . $item['title'] . '</label>';
                         $tableRows[] =    '</td>';
-                        $tableRows[] =    '<td>' . $item['help'] . '</td>';
+                        $tableRows[] =    '<td class="text-right">' . $item['help'] . '</td>';
                         $tableRows[] = '</tr>';
                         $resetGroup[] = 'document.editform[' . GeneralUtility::quoteJSvalue($item['name']) . '].checked=' . $item['checked'] . ';';
                     }
@@ -168,16 +168,17 @@ class SelectCheckBoxElement extends AbstractFormElement
                     if (is_array($group['header'])) {
                         $html[] = '<div id="' . $groupId . '" class="panel-collapse collapse" role="tabpanel">';
                     }
-                    $title = $this->getLanguageService()->sL('LLL:EXT:lang/locallang_core.xlf:labels.toggleall');
+                    $checkboxId = uniqid($groupId);
+                    $title = htmlspecialchars($this->getLanguageService()->sL('LLL:EXT:lang/locallang_core.xlf:labels.toggleall'));
                     $html[] =    '<div class="table-responsive">';
                     $html[] =        '<table class="table table-transparent table-hover">';
                     $html[] =            '<thead>';
                     $html[] =                '<tr>';
                     $html[] =                    '<th class="col-checkbox">';
-                    $html[] =                       '<input type="checkbox" class="t3js-toggle-checkboxes" data-trigger="hover" data-placement="right" data-title="' . htmlspecialchars($title) . '" data-toggle="tooltip" />';
+                    $html[] =                       '<input type="checkbox" id="' . $checkboxId . '" class="t3js-toggle-checkboxes" data-trigger="hover" data-placement="right" data-title="' . $title . '" data-toggle="tooltip" />';
                     $html[] =                    '</th>';
-                    $html[] =                    '<th class="col-icon"></th>';
-                    $html[] =                    '<th class="text-right" colspan="2">' . $resetGroupBtn . '</th>';
+                    $html[] =                    '<th class="col-title" colspan="2"><label for="' . $checkboxId . '">' . $title . '</label></th>';
+                    $html[] =                    '<th class="text-right">' . $resetGroupBtn . '</th>';
                     $html[] =                '</tr>';
                     $html[] =            '</thead>';
                     $html[] =            '<tbody>' . implode(LF, $tableRows) . '</tbody>';
index 334032c..a929fbc 100644 (file)
@@ -10127,6 +10127,9 @@ table {
 .table > thead > tr {
   background-color: #ededed;
 }
+.table > thead > tr th.col-checkbox + th.col-title label {
+  margin-bottom: 0px;
+}
 .table > thead > tr th,
 .table > thead > tr td {
   border-bottom: 1px solid #cccccc;
index 59b3a34..5c20dd0 100644 (file)
@@ -1952,7 +1952,7 @@ class DatabaseRecordList extends AbstractDatabaseRecordList
                                                <tr>
                                                        <th class="col-checkbox checkbox" colspan="2">
                                                                <label><input type="checkbox" class="checkbox checkAll" ' . ($checkAllChecked ? ' checked="checked"' : '') . '>
-                                                               ' . htmlspecialchars($lang->sL('LLL:EXT:lang/locallang_core.xlf:labels.checkAll')) . '</label>
+                                                               ' . htmlspecialchars($lang->sL('LLL:EXT:lang/locallang_core.xlf:labels.toggleall')) . '</label>
                                                        </th>
                                                </tr>
                                        </thead>