config forms: prepend our custom view decorator when saving the configuration failed

This commit is contained in:
Eric Lippmann 2014-11-04 14:48:24 +01:00
parent a965017d73
commit aac161d7a0
2 changed files with 4 additions and 3 deletions

View File

@ -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;
}

View File

@ -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>