37 'renderType' =>
'tcaDescription',
47 'localizationStateSelector' => [
48 'renderType' =>
'localizationStateSelector',
50 'otherLanguageContent' => [
51 'renderType' =>
'otherLanguageContent',
53 'localizationStateSelector'
56 'defaultLanguageDifferences' => [
57 'renderType' =>
'defaultLanguageDifferences',
59 'otherLanguageContent',
75 $parameterArray = $this->data[
'parameterArray'];
76 $config = $parameterArray[
'fieldConf'][
'config'];
77 $disabled = !empty($config[
'readOnly']);
79 $selItems = $config[
'items'];
80 if (!empty($selItems)) {
83 if (is_array($parameterArray[
'itemFormElValue'])) {
84 $itemArray = $parameterArray[
'itemFormElValue'];
86 $itemArray = [(string)$parameterArray[
'itemFormElValue']];
88 $itemArray = array_flip($itemArray);
96 $sOnChange = implode(
'', $parameterArray[
'fieldChangeFunc']);
98 foreach ($selItems as $p) {
100 if ($p[1] ===
'--div--') {
102 if (isset($p[2]) && $p[2] !==
'empty-empty') {
106 $groups[$currentGroup][
'header'] = [
122 if (is_array($p[3])) {
125 $helpArray[
'description'] = $p[3];
134 if (isset($itemArray[$p[1]])) {
136 unset($itemArray[$p[1]]);
140 $groups[$currentGroup][
'items'][] = [
142 'name' => $parameterArray[
'itemFormElName'] .
'[' . $c .
']',
144 'checked' => $checked,
157 $fieldInformationHtml = $fieldInformationResult[
'html'];
161 $fieldWizardHtml = $fieldWizardResult[
'html'];
164 $html[] =
'<div class="formengine-field-item t3js-formengine-field-item">';
165 $html[] = $fieldInformationHtml;
166 $html[] =
'<div class="form-wizards-wrap">';
167 $html[] =
'<div class="form-wizards-element">';
170 $html[] =
'<input type="hidden" class="select-checkbox" name="' . htmlspecialchars($parameterArray[
'itemFormElName']) .
'" value="">';
173 foreach ($groups as $groupKey => $group) {
174 $groupId = htmlspecialchars($parameterArray[
'itemFormElID']) .
'-group-' . $groupKey;
175 $html[] =
'<div class="panel panel-default">';
176 if (is_array($group[
'header'])) {
177 $html[] =
'<div class="panel-heading">';
178 $html[] =
'<a data-toggle="collapse" href="#' . $groupId .
'" aria-expanded="false" aria-controls="' . $groupId .
'">';
179 $html[] = $group[
'header'][
'icon'];
180 $html[] = htmlspecialchars($group[
'header'][
'title']);
184 if (is_array($group[
'items']) && !empty($group[
'items'])) {
189 foreach ($group[
'items'] as $item) {
190 $tableRows[] =
'<tr class="' . $item[
'class'] .
'">';
191 $tableRows[] =
'<td class="col-checkbox">';
192 $tableRows[] =
'<input type="checkbox" class="t3js-checkbox" '
193 .
'id="' . $item[
'id'] .
'" '
194 .
'name="' . htmlspecialchars($item[
'name']) .
'" '
195 .
'value="' . htmlspecialchars($item[
'value']) .
'" '
196 .
'onclick="' . htmlspecialchars($sOnChange) .
'" '
197 . ($item[
'checked'] ?
'checked=checked ' :
'')
198 . ($item[
'disabled'] ?
'disabled=disabled ' :
'') .
'>';
199 $tableRows[] =
'</td>';
200 $tableRows[] =
'<td class="col-icon">';
201 $tableRows[] =
'<label class="label-block" for="' . $item[
'id'] .
'">' . $item[
'icon'] .
'</label>';
202 $tableRows[] =
'</td>';
203 $tableRows[] =
'<td class="col-title">';
204 $tableRows[] =
'<label class="label-block nowrap-disabled" for="' . $item[
'id'] .
'">' . htmlspecialchars($this->
appendValueToLabelInDebugMode($item[
'title'], $item[
'value']), ENT_COMPAT,
'UTF-8',
false) .
'</label>';
205 $tableRows[] =
'</td>';
206 $tableRows[] =
'<td class="text-right">' . $item[
'help'] .
'</td>';
207 $tableRows[] =
'</tr>';
208 $resetGroup[] =
'document.editform[' . GeneralUtility::quoteJSvalue($item[
'name']) .
'].checked=' . $item[
'checked'] .
';';
213 if (!empty($resetGroup)) {
214 $resetGroup[] =
'TYPO3.FormEngine.updateCheckboxState(this);';
215 $title = htmlspecialchars($this->
getLanguageService()->sL(
'LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:labels.revertSelection'));
216 $resetGroupBtn =
'<a href="#" '
217 .
'class="btn btn-default btn-sm" '
218 .
'onclick="' . implode(
'', $resetGroup) .
' return false;" '
219 .
'title="' . $title .
'">'
220 . $this->iconFactory->getIcon(
'actions-edit-undo',
Icon::SIZE_SMALL)->render() .
' '
221 . $this->
getLanguageService()->
sL(
'LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:labels.revertSelection') .
'</a>';
224 if (is_array($group[
'header'])) {
225 $html[] =
'<div id="' . $groupId .
'" class="panel-collapse collapse" role="tabpanel">';
227 $checkboxId = uniqid($groupId);
228 $title = htmlspecialchars($this->
getLanguageService()->sL(
'LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:labels.toggleall'));
229 $html[] =
'<div class="table-responsive">';
230 $html[] =
'<table class="table table-transparent table-hover">';
233 $html[] =
'<th class="col-checkbox">';
234 $html[] =
'<input type="checkbox" id="' . $checkboxId .
'" class="t3js-toggle-checkboxes" data-trigger="hover" data-placement="right" data-title="' . $title .
'" data-toggle="tooltip" />';
236 $html[] =
'<th class="col-title" colspan="2"><label for="' . $checkboxId .
'">' . $title .
'</label></th>';
237 $html[] =
'<th class="text-right">' . $resetGroupBtn .
'</th>';
239 $html[] =
'</thead>';
240 $html[] =
'<tbody>' . implode(LF, $tableRows) .
'</tbody>';
241 $html[] =
'</table>';
243 if (is_array($group[
'header'])) {
251 if (!$disabled && !empty($fieldWizardHtml)) {
252 $html[] =
'<div class="form-wizards-items-bottom">';
253 $html[] = $fieldWizardHtml;
260 $resultArray[
'html'] = implode(LF, $html);
261 $resultArray[
'requireJsModules'][] =
'TYPO3/CMS/Backend/Tooltip';