config forms: prepend our custom view decorator when saving the configuration failed
This commit is contained in:
parent
a965017d73
commit
aac161d7a0
|
@ -5,6 +5,7 @@
|
|||
namespace Icinga\Form;
|
||||
|
||||
use Exception;
|
||||
use Zend_Form_Decorator_Abstract;
|
||||
use Icinga\Web\Form;
|
||||
use Icinga\Application\Config;
|
||||
use Icinga\File\Ini\IniWriter;
|
||||
|
@ -58,7 +59,8 @@ class ConfigForm extends Form
|
|||
'viewScript' => 'showConfiguration.phtml',
|
||||
'errorMessage' => $e->getMessage(),
|
||||
'configString' => $writer->render(),
|
||||
'filePath' => $this->config->getConfigFile()
|
||||
'filePath' => $this->config->getConfigFile(),
|
||||
'placement' => Zend_Form_Decorator_Abstract::PREPEND
|
||||
));
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
<div>
|
||||
<h4><?= $this->translate('Saving Configuration Failed'); ?></h4>
|
||||
<br>
|
||||
<p>
|
||||
<?= sprintf(
|
||||
$this->translate('The file %s couldn\'t be stored. (Error: "%s")'),
|
||||
|
@ -25,4 +24,4 @@
|
|||
<pre>
|
||||
<code><?= $this->escape($configString); ?></code>
|
||||
</pre>
|
||||
</p>
|
||||
</p>
|
||||
|
|
Loading…
Reference in New Issue