diff --git a/app/plugins/CoreEnroller/src/Controller/AttributeCollectorsController.php b/app/plugins/CoreEnroller/src/Controller/AttributeCollectorsController.php index 7d19b315e..0e279be8e 100644 --- a/app/plugins/CoreEnroller/src/Controller/AttributeCollectorsController.php +++ b/app/plugins/CoreEnroller/src/Controller/AttributeCollectorsController.php @@ -95,12 +95,6 @@ public function dispatch(string $id) { ->find() ->where(['petition_id' => $petition->id]) ->all()); - - // Get the title - // XXX Replace $petition->enrollment_flow_id with the Enrollment Flow "Name" (for now) - // XXX We should have a "Title" for end-users that is different from the Enrollment Flow "Name" - // for start and dispatch. - $this->set('vv_title', $petition->enrollment_flow_id); $this->render('/Standard/dispatch'); } diff --git a/app/src/Controller/StandardEnrollerController.php b/app/src/Controller/StandardEnrollerController.php index d075de02f..4972655ae 100644 --- a/app/src/Controller/StandardEnrollerController.php +++ b/app/src/Controller/StandardEnrollerController.php @@ -107,8 +107,10 @@ public function calculatePermission(): bool { $this->llog('error', "Model ID missing from request"); return false; } - - $stepConfig = $this->$modelsName->get($modelId, ['contain' => 'EnrollmentFlowSteps']); + + $stepConfig = $this->$modelsName->get($modelId, ['contain' => ['EnrollmentFlowSteps' => ['EnrollmentFlows']]]); + $this->set('vv_step_config', $stepConfig); + $this->set('vv_title', $stepConfig['enrollment_flow_step']['enrollment_flow']['name']); // Check that the current actor has the role required for this step. // Note that role validation has already been performed for anonymous access diff --git a/app/templates/Standard/dispatch.php b/app/templates/Standard/dispatch.php index 5df393ceb..cc1550548 100644 --- a/app/templates/Standard/dispatch.php +++ b/app/templates/Standard/dispatch.php @@ -50,7 +50,8 @@