From 0fe35e32127130c1239d476baddc5dedd85d062a Mon Sep 17 00:00:00 2001 From: Thomas Gelf Date: Mon, 16 Mar 2015 13:19:05 +0100 Subject: [PATCH] BpConfigForm: really store to disk now --- application/forms/BpConfigForm.php | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/application/forms/BpConfigForm.php b/application/forms/BpConfigForm.php index 2f3c8c3..d68165e 100644 --- a/application/forms/BpConfigForm.php +++ b/application/forms/BpConfigForm.php @@ -134,7 +134,29 @@ class BpConfigForm extends Form Notification::success(sprintf('Process %s has been created', $name)); } else { - Notification::success(sprintf('Process %s has NOT YET been modified', $name)); + $config = $this->config; + + if ($title) { + $config->setTitle($title); + } + if ($backend) { + $config->setBackendName($backend); + } + if ($this->getValue('state_type') === 'soft') { + $config->useSoftStates(); + } else { + $config->useHardStates(); + } + + $this->storage->storeProcess($config); + $config->clearAppliedChanges(); + $this->setRedirectUrl( + Url::fromPath( + $this->getRedirectUrl(), + array('config' => $name) + ) + ); + Notification::success(sprintf('Process %s has been stored', $name)); } } }