ProcessController: switch config based on a field

This commit is contained in:
Thomas Gelf 2016-11-28 00:49:21 +01:00
parent 1c7792321a
commit 281b3286bd
2 changed files with 2 additions and 1 deletions

View file

@ -318,7 +318,7 @@ class ProcessController extends Controller
protected function redirectOnConfigSwitch()
{
$request = $this->getRequest();
if ($request->isPost()) {
if ($request->isPost() && $request->getPost('action') === 'switchConfig') {
// We switched the process in the config dropdown list
$params = array(
'config' => $request->getPost('config')

View file

@ -7,6 +7,7 @@ use Icinga\Module\Businessprocess\BusinessProcess;
<div class="controls">
<?= $this->tabs ?>
<h1><form method="post" action="<?= $this->url()->without('node')->without('unlocked') ?>">
<input type="hidden" name="action" value="switchConfig" />
<?= $this->formSelect('config', $this->configName, array('class' => 'autosubmit'), $this->processList) ?>
</form></h1>
<?= $this->actions ?>