diff --git a/pages/UI.php b/pages/UI.php index 77a136cf2a..c171200bf5 100644 --- a/pages/UI.php +++ b/pages/UI.php @@ -281,7 +281,7 @@ function DisplayMultipleSelectionForm(WebPage $oP, DBSearch $oFilter, string $sN //by default all the elements are selected $aExtraParams['selectionMode'] = 'negative'; $oForm->AddSubBlock($oDisplayBlock->GetDisplay($oP, 1, $aExtraParams)); - $oForm->AddSubBlock(ButtonUIBlockFactory::MakeNeutral(Dict::S('UI:Button:Cancel'), 'cancel')->SetOnClickJsCode('window.history.back()')); + $oForm->AddSubBlock(ButtonUIBlockFactory::MakeForCancel(Dict::S('UI:Button:Cancel'), 'cancel')->SetOnClickJsCode('window.history.back()')); $oForm->AddSubBlock(ButtonUIBlockFactory::MakeForPrimaryAction(Dict::S('UI:Button:Next'), 'next', Dict::S('UI:Button:Next'), true)); $oP->AddUiBlock($oForm); diff --git a/sources/application/UI/Base/Component/DataTable/DataTable.php b/sources/application/UI/Base/Component/DataTable/DataTable.php index df0d9f1bc6..b4da8a96f5 100644 --- a/sources/application/UI/Base/Component/DataTable/DataTable.php +++ b/sources/application/UI/Base/Component/DataTable/DataTable.php @@ -51,8 +51,8 @@ class DataTable extends UIContentBlock public function __construct(?string $sId = null) { parent::__construct($sId); - //$this->AddDeferredBlock(new DataTableConfig($this)); - $this->AddSubBlock(new DataTableConfig($this)); + // This block contains a form, so it has to be added later in the flow + $this->AddDeferredBlock(new DataTableConfig($this)); $this->aDisplayColumns = []; $this->aOptions = []; $this->aResultColumns = [];