PreferenceForm: Reload the entire layout if the locale changes
This commit is contained in:
parent
a87f15c861
commit
9d6bef0a39
|
@ -94,6 +94,7 @@ class PreferenceForm extends Form
|
|||
$this->preferences = new Preferences($this->store ? $this->store->load() : array());
|
||||
|
||||
$oldTheme = $this->preferences->getValue('icingaweb', 'theme');
|
||||
$oldLocale = $this->preferences->getValue('icingaweb', 'language');
|
||||
|
||||
$webPreferences = $this->preferences->get('icingaweb', array());
|
||||
foreach ($this->getValues() as $key => $value) {
|
||||
|
@ -118,6 +119,12 @@ class PreferenceForm extends Form
|
|||
$this->getResponse()->setReloadCss(true);
|
||||
}
|
||||
|
||||
if (($locale = $this->getElement('language')) !== null
|
||||
&& $locale->getValue() !== $oldLocale
|
||||
) {
|
||||
$this->getResponse()->setHeader('X-Icinga-Redirect-Http', 'yes');
|
||||
}
|
||||
|
||||
try {
|
||||
if ($this->store && $this->getElement('btn_submit')->isChecked()) {
|
||||
$this->save();
|
||||
|
|
Loading…
Reference in New Issue