diff --git a/application/cmdbabstract.class.inc.php b/application/cmdbabstract.class.inc.php index efda53248..a0fef70b4 100644 --- a/application/cmdbabstract.class.inc.php +++ b/application/cmdbabstract.class.inc.php @@ -4741,22 +4741,21 @@ EOF 'errors' => '
'.($bResult ? '' : implode('
', $aErrors)).'
', '@class' => $sCSSClass, ); - if ($bResult && (!$bPreview)) - { + if ($bResult && (!$bPreview)) { $oObj->DBUpdate(); } } set_time_limit(intval($iPreviousTimeLimit)); - $oP->Table($aHeaders, $aRows); - if ($bPreview) - { + $oDataTable = DataTableUIBlockFactory::MakeForForm(uniqid('form_', true), $aHeaders, $aRows); + $oDataTable->SetOptions(['select_mode' => 'custom']); + $oP->AddUiBlock($oDataTable); + if ($bPreview) { $sFormAction = utils::GetAbsoluteUrlAppRoot().'pages/UI.php'; // No parameter in the URL, the only parameter will be the ones passed through the form // Form to submit: $oP->add("