ProcessController: Provide a new set of parameters when redirecting

This commit is contained in:
Johannes Meyer 2019-01-10 15:44:50 +01:00
parent eac7f3e76f
commit b46a633d6d

View file

@ -251,9 +251,14 @@ class ProcessController extends Controller
->setSimulation(Simulation::fromSession($this->session()))
->handleRequest();
} elseif ($action === 'move') {
$url = Url::fromRequest()->without(['action', 'movenode']);
if ($url->getParam('mode') === 'tree') {
$url = $url->without('node');
$url = Url::fromPath('businessprocess/process/show', ['config' => $bp->getName()]);
if ($this->url()->hasParam('unlocked')) {
$url->setParam('unlocked', $this->url()->getParam('unlocked'));
}
if ($this->url()->hasParam('mode')) {
$url->setParam('mode', $this->url()->getParam('mode'));
} elseif ($this->url()->hasParam('node')) {
$url->setParam('node', $this->url()->getParam('node'));
}
$form = $this->loadForm('MoveNode')