Skip to content

Commit

Permalink
ScheduleController: Fix title for rotation modal (#288)
Browse files Browse the repository at this point in the history
fixes #268
  • Loading branch information
sukhwinder33445 authored Feb 26, 2025
2 parents 23e710a + c85b0d4 commit 590a1c3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions application/controllers/ScheduleController.php
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand All @@ -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);
}
}
Expand All @@ -145,6 +145,7 @@ public function editRotationAction(): void
{
$id = (int) $this->params->getRequired('id');
$scheduleId = (int) $this->params->getRequired('schedule');
$this->setTitle($this->translate('Edit Rotation'));

$form = new RotationConfigForm($scheduleId, Database::get());
$form->disableModeSelection();
Expand Down Expand Up @@ -181,7 +182,6 @@ public function editRotationAction(): void
$form->handleRequest($this->getServerRequest());

if (empty($this->parts)) {
$this->setTitle($this->translate('Edit Rotation'));
$this->addContent($form);
}
}
Expand Down

0 comments on commit 590a1c3

Please sign in to comment.