Skip to content

Commit 3e71293

Browse files
committed
Merge remote-tracking branch 'origin/main' into feature/add-typo3v14-support
2 parents 1de943f + f694226 commit 3e71293

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

Classes/Backend/ToolbarItems/CrowdinToolbarItem.php

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -139,10 +139,17 @@ protected function createToggleSwitch(string $name, bool $enabled): string
139139

140140
$GLOBALS['TYPO3_CONF_VARS']['BE']['debug'] = $backupDebug;
141141

142-
// We need to get rid of a "form-wizards-item-element" class that is useless and
143-
// breaks or hand-crafted layout by enforcing a 120px minimum width (backend.css)
144-
// for the toggle usually part of a TCA form
145-
$checkboxHtml = str_replace('<div class="form-wizards-item-element">', '<div>', $result['html']);
142+
if ($this->typo3Version >= 13) {
143+
// We need to get rid of a "form-wizards-item-element" class that is useless and
144+
// breaks or hand-crafted layout by enforcing a 120px minimum width (backend.css)
145+
// for the toggle usually part of a TCA form
146+
$checkboxHtml = str_replace('<div class="form-wizards-item-element">', '<div>', $result['html']);
147+
} else {
148+
// We need to get rid of a "form-wizards-element" class that is useless and
149+
// breaks or hand-crafted layout by enforcing a 120px minimum width (backend.css)
150+
// for the toggle usually part of a TCA form
151+
$checkboxHtml = str_replace('<div class="form-wizards-element">', '<div>', $result['html']);
152+
}
146153

147154
return $checkboxHtml;
148155
}

0 commit comments

Comments
 (0)