DashboardsController: Add requested params to the refresh url when reordering widgets

This commit is contained in:
Yonas Habteab 2022-06-08 13:04:47 +02:00
parent f9aba0c7ff
commit d7dcfd7cd9

View File

@ -376,14 +376,15 @@ class DashboardsController extends CompatController
} }
} }
$params = clone $this->params;
if ($duplicatedError) { if ($duplicatedError) {
// Even though the drop action couldn't be performed successfully from our server, Sortable JS has // Even though the drop action couldn't be performed successfully from our server, Sortable JS has
// already dropped the draggable element though, so we need to redirect here to undo it. // already dropped the draggable element though, so we need to redirect here to undo it.
$this->redirectNow(Dashboard::BASE_ROUTE . '/settings'); $this->redirectNow(Url::fromPath(Dashboard::BASE_ROUTE . '/settings')->setParams($params));
} }
$this->createTabs(); $this->createTabs();
$this->getTabs()->setRefreshUrl(Url::fromPath(Dashboard::BASE_ROUTE . '/settings')); $this->getTabs()->setRefreshUrl(Url::fromPath(Dashboard::BASE_ROUTE . '/settings')->setParams($params));
$this->dashboard->activate('dashboard_settings'); $this->dashboard->activate('dashboard_settings');
$this->sendMultipartUpdate(); $this->sendMultipartUpdate();
} }