diff --git a/src/Resources/contao/templates/dcbe_general_edit.html5 b/src/Resources/contao/templates/dcbe_general_edit.html5 index 954051a2..abaa914a 100644 --- a/src/Resources/contao/templates/dcbe_general_edit.html5 +++ b/src/Resources/contao/templates/dcbe_general_edit.html5 @@ -90,7 +90,13 @@ $GLOBALS['TL_CSS']['cca.dc-general.generalDriver'] = '/bundles/ccadcgeneral/css/ fieldsets as $arrFieldset): $paletteId = 'pal_' . StringUtil::specialchars($arrFieldset['legend']); - $class = $arrFieldset['class'] . (($fieldsetStates[$this->table][$paletteId] ?? null) ? '' : ' collapsed'); + $class = $arrFieldset['class']; + if (null !== ($fieldsetState = ($fieldsetStates[$this->table][$paletteId] ?? null))) { + $class = \str_replace(' collapsed', '', $class); + if (0 === $fieldsetState) { + $class .= ' collapsed'; + } + } if($arrFieldset['legend'] ?? null): ?>