Follow-up for 63802dfc4

This commit is contained in:
Johannes Meyer 2022-04-22 08:57:59 +02:00
parent 2732d7df66
commit fdc9b36ee5
2 changed files with 6 additions and 1 deletions

View File

@ -249,6 +249,11 @@ class DashboardsController extends CompatController
$this->dashboard->load();
$home = $this->params->getRequired('home');
// TODO: Shouldn't be necessary. load() should get the name already and
// the form should otherwise ensure it has the required data
$this->dashboard->activateHome($this->dashboard->getEntry($home));
$dashletForm = new DashletForm($this->dashboard);
$dashletForm->populate($this->getRequest()->getPost());
$dashletForm->on(DashletForm::ON_SUCCESS, function () {

View File

@ -56,7 +56,7 @@ class DashletForm extends SetupNewDashboardForm
$panes = $firstHome->getEntryKeyTitleArr();
}
} else {
$panes = $activeHome->getEntryKeyTitleArr();
$panes = $activeHome->loadDashboardEntries()->getEntryKeyTitleArr();
}
} elseif ($this->dashboard->hasEntry($populatedHome)) {
$this->dashboard->loadDashboardEntries($populatedHome);