mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-09-26 03:09:10 +02:00
Don't render the initial modal view over again when autosubmitting the form
This commit is contained in:
parent
737f1d459a
commit
b39f6ad48e
@ -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()) {
|
||||
|
@ -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();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user