File tree Expand file tree Collapse file tree 2 files changed +12
-2
lines changed
library/Notifications/Widget Expand file tree Collapse file tree 2 files changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -219,7 +219,13 @@ public function moveRotationAction(): void
219219 $ form = new MoveRotationForm (Database::get ());
220220 $ form ->on (MoveRotationForm::ON_SUCCESS , function (MoveRotationForm $ form ) {
221221 $ this ->sendExtraUpdates (['#col1 ' ]);
222- $ this ->redirectNow (Links::schedule ($ form ->getScheduleId ()));
222+ $ requestUrl = Url::fromRequest ();
223+ $ redirectUrl = Links::schedule ($ form ->getScheduleId ());
224+ $ defaultTimezoneParam = TimezonePicker::DEFAULT_TIMEZONE_PARAM ;
225+ if ($ requestUrl ->hasParam ($ defaultTimezoneParam )) {
226+ $ redirectUrl ->addParams ([$ defaultTimezoneParam => $ requestUrl ->getParam ($ defaultTimezoneParam )]);
227+ }
228+ $ this ->redirectNow ($ redirectUrl );
223229 });
224230
225231 $ form ->handleRequest ($ this ->getServerRequest ());
Original file line number Diff line number Diff line change @@ -307,7 +307,11 @@ protected function assembleSidebarEntry(Rotation $rotation): BaseHtmlElement
307307 $ entry = new HtmlElement ('div ' , Attributes::create (['class ' => 'rotation-name ' ]));
308308
309309 $ form = new MoveRotationForm ();
310- $ form ->setAction (Links::moveRotation ()->getAbsoluteUrl ());
310+ $ form ->setAction (
311+ Links::moveRotation ()
312+ ->with (['display_timezone ' => ScheduleDateTimeFactory::getDisplayTimezone ()->getName ()])
313+ ->getAbsoluteUrl ()
314+ );
311315 $ form ->populate ([
312316 'rotation ' => $ rotation ->getId (),
313317 'priority ' => $ rotation ->getPriority ()
You can’t perform that action at this time.
0 commit comments