From 281b3286bd863b0e5e8b81ff8a038375b7a0b2ea Mon Sep 17 00:00:00 2001 From: Thomas Gelf Date: Mon, 28 Nov 2016 00:49:21 +0100 Subject: [PATCH] ProcessController: switch config based on a field --- application/controllers/ProcessController.php | 2 +- application/views/scripts/process/show.phtml | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/application/controllers/ProcessController.php b/application/controllers/ProcessController.php index a095dea..c13389b 100644 --- a/application/controllers/ProcessController.php +++ b/application/controllers/ProcessController.php @@ -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') diff --git a/application/views/scripts/process/show.phtml b/application/views/scripts/process/show.phtml index 1af2b8a..bc23501 100644 --- a/application/views/scripts/process/show.phtml +++ b/application/views/scripts/process/show.phtml @@ -7,6 +7,7 @@ use Icinga\Module\Businessprocess\BusinessProcess;
tabs ?>

+ formSelect('config', $this->configName, array('class' => 'autosubmit'), $this->processList) ?>

actions ?>