From aa74a5e9861f83c7d539faa1e519d4a498568c70 Mon Sep 17 00:00:00 2001 From: Sukhwinder Dhillon Date: Thu, 30 Jan 2025 08:43:45 +0100 Subject: [PATCH] ScheduleController: Always add title for modal Otherwise, as soon as the modal form triggers an auto-submit, the title is changed to the default title (`Icinga Web`). --- application/controllers/ScheduleController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/application/controllers/ScheduleController.php b/application/controllers/ScheduleController.php index 298a0159..513eb41a 100644 --- a/application/controllers/ScheduleController.php +++ b/application/controllers/ScheduleController.php @@ -112,6 +112,7 @@ public function addAction(): void public function addRotationAction(): void { $scheduleId = (int) $this->params->getRequired('schedule'); + $this->setTitle($this->translate('Add Rotation')); $form = new RotationConfigForm($scheduleId, Database::get()); $form->setAction($this->getRequest()->getUrl()->setParam('showCompact')->getAbsoluteUrl()); @@ -136,7 +137,6 @@ public function addRotationAction(): void $form->handleRequest($this->getServerRequest()); if (empty($this->parts)) { - $this->setTitle($this->translate('Add Rotation')); $this->addContent($form); } }