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