diff --git a/code/Controllers/CMSMain.php b/code/Controllers/CMSMain.php index db715788..741fed45 100644 --- a/code/Controllers/CMSMain.php +++ b/code/Controllers/CMSMain.php @@ -2114,23 +2114,23 @@ class CMSMain extends LeftAndMain implements CurrentPageIdentifier, PermissionPr public function BatchActionParameters() { - $batchActions = CMSBatchActionHandler::config()->batch_actions; + $batchActions = $this->batchactions()->registeredActions(); $forms = []; foreach ($batchActions as $urlSegment => $batchAction) { - $SNG_action = singleton($batchAction); - if ($SNG_action->canView() && $fieldset = $SNG_action->getParameterFields()) { + $SNG_action = singleton($batchAction["class"]); + if ($SNG_action->canView() && $fieldList = $SNG_action->getParameterFields()) { $formHtml = ''; /** @var FormField $field */ - foreach ($fieldset as $field) { - $formHtml .= $field->Field(); + foreach ($fieldList as $field) { + $formHtml .= $field->FieldHolder(); } $forms[$urlSegment] = $formHtml; } } $pageHtml = ''; foreach ($forms as $urlSegment => $html) { - $pageHtml .= "
$html
\n\n"; + $pageHtml .= "
$html
\n\n"; } return new LiteralField("BatchActionParameters", ''); }