[BUGFIX] Palettes "more options" can not be extended if new record is added 62/40262/2
authorFrank Nägler <typo3@naegler.net>
Mon, 15 Jun 2015 17:12:04 +0000 (19:12 +0200)
committerJigal van Hemert <jigal.van.hemert@typo3.org>
Mon, 15 Jun 2015 17:34:50 +0000 (19:34 +0200)
HTML ID attribute must not contain a dot, which happens if a new record
is created. In this case the toggle button not work.
This patch replace the dot with an underscore.

Resolves: #67472
Releases: master
Change-Id: I8aa727bb4762e62b42f4dcdbb47477013023f879
Reviewed-on: http://review.typo3.org/40262
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: Jan Helke <typo3@helke.de>
Tested-by: Jan Helke <typo3@helke.de>
Reviewed-by: Jigal van Hemert <jigal.van.hemert@typo3.org>
Tested-by: Jigal van Hemert <jigal.van.hemert@typo3.org>
typo3/sysext/backend/Classes/Form/Container/PaletteAndSingleContainer.php

index 46f580a..195e9c8 100644 (file)
@@ -205,7 +205,7 @@ class PaletteAndSingleContainer extends AbstractContainer {
                                }
 
                                if ($renderUnCollapseButtonWrapper) {
-                                       $cssId = 'FORMENGINE_' . $this->globalOptions['table'] . '_' . $paletteName . '_' . $this->globalOptions['databaseRow']['uid'];
+                                       $cssId = str_replace('.', '_', 'FORMENGINE_' . $this->globalOptions['table'] . '_' . $paletteName . '_' . $this->globalOptions['databaseRow']['uid']);
                                        $paletteElementsHtml = $this->wrapPaletteWithCollapseButton($paletteElementsHtml, $cssId);
                                } else {
                                        $paletteElementsHtml = '<div class="row">' . $paletteElementsHtml . '</div>';
@@ -499,4 +499,4 @@ class PaletteAndSingleContainer extends AbstractContainer {
                return $GLOBALS['LANG'];
        }
 
-}
\ No newline at end of file
+}