diff --git a/application/forms/Dashboard/DashletForm.php b/application/forms/Dashboard/DashletForm.php index 49406bde3..6c4cc2f8e 100644 --- a/application/forms/Dashboard/DashletForm.php +++ b/application/forms/Dashboard/DashletForm.php @@ -38,10 +38,6 @@ class DashletForm extends SetupNewDashboardForm protected function assembleNextPageDashboardPart() { - if (! $this->isUpdatingADashlet() && ! $this->getPopulatedValue('btn_next')) { - return; - } - $requestUrl = Url::fromRequest(); $homes = $this->dashboard->getEntryKeyTitleArr(); @@ -127,7 +123,7 @@ class DashletForm extends SetupNewDashboardForm protected function assemble() { - if ($this->isUpdatingADashlet() || $this->getPopulatedValue('btn_next')) { + if ($this->isUpdatingADashlet() || $this->getPopulatedValue('btn_next') || $this->hasBeenSent()) { $this->assembleNextPage(); if ($this->isUpdatingADashlet()) { diff --git a/application/forms/Dashboard/SetupNewDashboardForm.php b/application/forms/Dashboard/SetupNewDashboardForm.php index 10315d401..deff5f5f2 100644 --- a/application/forms/Dashboard/SetupNewDashboardForm.php +++ b/application/forms/Dashboard/SetupNewDashboardForm.php @@ -49,7 +49,7 @@ class SetupNewDashboardForm extends BaseDashboardForm */ protected function dumpArbitaryDashlets(bool $strict = true): void { - $choosenDashlets = []; + $chosenDashlets = []; foreach (self::$moduleDashlets as $module => $dashlets) { /** @var Dashlet $dashlet */ foreach ($dashlets as $dashlet) { @@ -65,19 +65,19 @@ class SetupNewDashboardForm extends BaseDashboardForm ->setTitle($title); } - $choosenDashlets[$module][$dashlet->getName()] = $dashlet; + $chosenDashlets[$module][$dashlet->getName()] = $dashlet; } } - if (isset($choosenDashlets[$module]) && ! $this->duplicateCustomDashlet) { + if (isset($chosenDashlets[$module]) && ! $this->duplicateCustomDashlet) { $this->duplicateCustomDashlet = array_key_exists( $this->getPopulatedValue('dashlet'), - $choosenDashlets[$module] + $chosenDashlets[$module] ); } } - self::$moduleDashlets = $choosenDashlets; + self::$moduleDashlets = $chosenDashlets; } /** @@ -97,11 +97,8 @@ class SetupNewDashboardForm extends BaseDashboardForm */ protected function assembleNextPage() { - if (! $this->isUpdatingADashlet() && ! $this->getPopulatedValue('btn_next')) { - return; - } - - $this->dumpArbitaryDashlets(); + $strict = $this->isUpdatingADashlet() || $this->getPopulatedValue('btn_next') || ! $this->hasBeenSent(); + $this->dumpArbitaryDashlets($strict); $this->assembleNextPageDashboardPart(); $this->assembleNexPageDashletPart(); }