N°3564 Alert and CollapsibleSectionState can now be saved

This commit is contained in:
Pierre Goiffon
2020-12-24 11:36:51 +01:00
parent d3efd3ea0e
commit 2c0d001721
7 changed files with 128 additions and 5 deletions

View File

@@ -82,6 +82,9 @@ $oAlertNonClosable = AlertFactory::MakeNeutral('Alert not closable, not collapsa
->SetIsClosable(false)
->SetIsCollapsible(false);
$oPageContentLayout->AddMainBlock($oAlertNonClosable);
$oAlertSaveCollapsibleState = AlertFactory::MakeNeutral('Alert with collapsible state saving', $sContent)
->EnableSaveCollapsibleState('RenderAllUiBlocks-alert');
$oPageContentLayout->AddMainBlock($oAlertSaveCollapsibleState);
$oPageContentLayout->AddMainBlock(new Html('<hr/>'));
@@ -167,7 +170,12 @@ $oPageContentLayout->AddMainBlock(new Html('<hr/>'));
$oCollapsibleSectionTitle = new Html('<h2 id="title-panels">Collapsible Sections examples</h2>');
$oPage->AddUiBlock($oCollapsibleSectionTitle);
$oCollapsibleSection = new CollapsibleSection('Section title', [new Html("This the section content !")]);
$sSectionContent = 'This is the section content !';
$oCollapsibleSection = new CollapsibleSection('Section title', [new Html($sSectionContent)]);
$oPage->AddUiBlock($oCollapsibleSection);
$oCollapsibleSectionSaveState = new CollapsibleSection('Section save state', [new Html($sSectionContent)]);
$oCollapsibleSectionSaveState->EnableSaveCollapsibleState('RenderAllUiBlocks-collapsible-section');
$oPage->AddUiBlock($oCollapsibleSectionSaveState);
$oPage->output();