mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-04-08 17:15:08 +02:00
ConfigForm: Only render valid configurations in the ui
refs #3648 Signed-off-by: Eric Lippmann <eric.lippmann@icinga.com>
This commit is contained in:
parent
ed7ecb32a5
commit
1e0a2cdb64
@ -4,6 +4,7 @@
|
||||
namespace Icinga\Forms;
|
||||
|
||||
use Exception;
|
||||
use Icinga\Exception\ConfigurationError;
|
||||
use Zend_Form_Decorator_Abstract;
|
||||
use Icinga\Application\Config;
|
||||
use Icinga\Web\Form;
|
||||
@ -99,6 +100,10 @@ class ConfigForm extends Form
|
||||
{
|
||||
try {
|
||||
$this->writeConfig($this->config);
|
||||
} catch (ConfigurationError $e) {
|
||||
$this->addError($e->getMessage());
|
||||
|
||||
return false;
|
||||
} catch (Exception $e) {
|
||||
$this->addDecorator('ViewScript', array(
|
||||
'viewModule' => 'default',
|
||||
|
Loading…
x
Reference in New Issue
Block a user