diff --git a/pages/csvimport.php b/pages/csvimport.php index 4202eb918d..3d4c535698 100644 --- a/pages/csvimport.php +++ b/pages/csvimport.php @@ -638,12 +638,12 @@ try { if ($bShouldConfirm) { $sYesButton = Dict::S('UI:Button:Ok'); $sNoButton = Dict::S('UI:Button:Cancel'); - $oDlg = UIContentBlockUIBlockFactory::MakeStandard("dlg_confirmation"); + $oDlg = UIContentBlockUIBlockFactory::MakeStandard("dlg_confirmation")->SetHasForcedDiv(true); $oPage->AddSubBlock($oDlg); $oDlg->AddSubBlock(new Html($sMessage)); $oDlg->AddSubBlock(new Html(htmlentities(Dict::S('UI:CSVImportConfirmMessage'), ENT_QUOTES, 'UTF-8'))); - $oDlgConfirm = UIContentBlockUIBlockFactory::MakeStandard("confirmation_chart"); + $oDlgConfirm = UIContentBlockUIBlockFactory::MakeStandard("confirmation_chart")->SetHasForcedDiv(true); $oDlg->AddSubBlock($oDlgConfirm); $sDlgTitle = Dict::S('UI:CSVImportConfirmTitle'); diff --git a/sources/application/UI/Base/Layout/UIContentBlock.php b/sources/application/UI/Base/Layout/UIContentBlock.php index 91e23b26f5..58f67a7725 100644 --- a/sources/application/UI/Base/Layout/UIContentBlock.php +++ b/sources/application/UI/Base/Layout/UIContentBlock.php @@ -31,7 +31,9 @@ class UIContentBlock extends UIBlock implements iUIContentBlock /** @var array */ protected $aSubBlocks; /** @var array */ - protected $aDeferredBlocks; + protected $aDeferredBlocks; + /** @var array */ + protected $bHasForcedDiv; /** * UIContentBlock constructor. @@ -46,6 +48,7 @@ class UIContentBlock extends UIBlock implements iUIContentBlock $this->aSubBlocks = []; $this->aDeferredBlocks = []; + $this->bHasForcedDiv = false; $this->SetCSSClasses($aContainerClasses); } @@ -197,5 +200,15 @@ class UIContentBlock extends UIBlock implements iUIContentBlock return $this; } - + + public function HasForcedDiv(): bool + { + return $this->bHasForcedDiv; + } + + public function SetHasForcedDiv(bool $bHasForcedDiv) + { + $this->bHasForcedDiv = $bHasForcedDiv; + return $this; + } } diff --git a/templates/base/layouts/content-block/layout.html.twig b/templates/base/layouts/content-block/layout.html.twig index 4d726d74f7..29da9abb08 100644 --- a/templates/base/layouts/content-block/layout.html.twig +++ b/templates/base/layouts/content-block/layout.html.twig @@ -3,7 +3,7 @@ {# Content Block #} {% apply spaceless %} - {% set bHasDiv = (oUIBlock.GetAdditionalCSSClassesAsString() or oUIBlock.GetBlocksInheritanceCSSClassesAsString() or oUIBlock.GetDataAttributes() or oUIBlock.IsHidden()) %} + {% set bHasDiv = (oUIBlock.GetAdditionalCSSClassesAsString() or oUIBlock.GetDataAttributes() or oUIBlock.IsHidden() or oUIBlock.HasForcedDiv()) %} {% block iboContentBlockContainer %} {% if bHasDiv %}