diff --git a/pages/notifications.php b/pages/notifications.php index 0ae36cb9a..ef4102ce9 100644 --- a/pages/notifications.php +++ b/pages/notifications.php @@ -44,7 +44,7 @@ $sAlertContent = Dict::S('UI:NotificationsMenu:HelpContent'); $oConfigurationHelp = new CollapsibleSection($sAlertTitle, [new Html($sAlertContent)]); $oConfigurationHelp ->SetOpenedByDefault(true) - ->EnableSaveCollapsibleState('notifications-home'); + ->EnableSaveCollapsibleState('notifications__home'); $oPageContentLayout->AddMainBlock($oConfigurationHelp); $oP->AddTabContainer('Tabs_0'); diff --git a/sources/application/UI/Base/Component/Alert/Alert.php b/sources/application/UI/Base/Component/Alert/Alert.php index 3017753f4..c61963498 100644 --- a/sources/application/UI/Base/Component/Alert/Alert.php +++ b/sources/application/UI/Base/Component/Alert/Alert.php @@ -128,7 +128,7 @@ class Alert extends UIBlock public function EnableSaveCollapsibleState($sSectionStateStorageKey) { $this->bIsSaveCollapsibleStateEnabled = true; - $this->sSectionStateStorageKey = $sSectionStateStorageKey; + $this->sSectionStateStorageKey = 'UI-Collapsible__'.$sSectionStateStorageKey; return $this; } diff --git a/sources/application/UI/Base/Component/CollapsibleSection/CollapsibleSection.php b/sources/application/UI/Base/Component/CollapsibleSection/CollapsibleSection.php index 56be2a168..30cbe6f34 100644 --- a/sources/application/UI/Base/Component/CollapsibleSection/CollapsibleSection.php +++ b/sources/application/UI/Base/Component/CollapsibleSection/CollapsibleSection.php @@ -63,7 +63,7 @@ class CollapsibleSection extends UIContentBlock public function EnableSaveCollapsibleState($sSectionStateStorageKey) { $this->bIsSaveCollapsibleStateEnabled = true; - $this->sSectionStateStorageKey = $sSectionStateStorageKey; + $this->sSectionStateStorageKey = 'UI-Collapsible__'.$sSectionStateStorageKey; return $this; } diff --git a/test/VisualTest/Backoffice/RenderAllUiBlocks.php b/test/VisualTest/Backoffice/RenderAllUiBlocks.php index 84e36889f..87ffc5dbc 100644 --- a/test/VisualTest/Backoffice/RenderAllUiBlocks.php +++ b/test/VisualTest/Backoffice/RenderAllUiBlocks.php @@ -86,7 +86,7 @@ $oAlertNonClosable = AlertFactory::MakeNeutral('Alert not closable, not collapsa ->SetIsCollapsible(false); $oPageContentLayout->AddMainBlock($oAlertNonClosable); $oAlertSaveCollapsibleState = AlertFactory::MakeNeutral('Alert with collapsible state saving', $sContent) - ->EnableSaveCollapsibleState('RenderAllUiBlocks-alert'); + ->EnableSaveCollapsibleState('RenderAllUiBlocks__alert'); $oPageContentLayout->AddMainBlock($oAlertSaveCollapsibleState); $oPageContentLayout->AddMainBlock(new Html('
')); @@ -178,7 +178,7 @@ $oCollapsibleSection = new CollapsibleSection('Section title', [new Html($sSecti $oPage->AddUiBlock($oCollapsibleSection); $oCollapsibleSectionSaveState = new CollapsibleSection('Section save state', [new Html($sSectionContent)]); -$oCollapsibleSectionSaveState->EnableSaveCollapsibleState('RenderAllUiBlocks-collapsible-section'); +$oCollapsibleSectionSaveState->EnableSaveCollapsibleState('RenderAllUiBlocks__section'); $oPage->AddUiBlock($oCollapsibleSectionSaveState); $oPage->output();