Add editable auto_refresh parameter to the user preferences

refs #7945
This commit is contained in:
Alexander Fuhr 2015-02-12 15:12:10 +01:00
parent ca0914644c
commit b9c9f564ec
2 changed files with 15 additions and 0 deletions

View File

@ -185,6 +185,17 @@ class PreferenceForm extends Form
)
);
$this->addElement(
'checkbox',
'auto_refresh',
array(
'required' => false,
'label' => $this->translate('Enable auto refresh'),
'description' => $this->translate('This option allows you to enable or to disable the global page content auto refresh'),
'value' => 1
)
);
if ($this->store) {
$this->addElement(
'submit',

View File

@ -399,6 +399,10 @@ class ActionController extends Zend_Controller_Action
$layout->benchmark = $this->renderBenchmark();
}
}
if ((bool) $user->getPreferences()->getValue('icingaweb', 'auto_refresh', true) === false) {
$this->disableAutoRefresh();
}
}
if ($req->getParam('format') === 'pdf') {