From: Marcin Haba Date: Thu, 8 Aug 2019 20:02:17 +0000 (+0200) Subject: baculum: Changes to proper working list type controls on page load X-Git-Tag: Release-9.6.0~149 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4d2913f6f8b815652c3b2b6c83e5fb8a396dc3ca;p=thirdparty%2Fbacula.git baculum: Changes to proper working list type controls on page load --- diff --git a/gui/baculum/protected/Web/Pages/FileSetView.php b/gui/baculum/protected/Web/Pages/FileSetView.php index 275609118..306e5bf5a 100644 --- a/gui/baculum/protected/Web/Pages/FileSetView.php +++ b/gui/baculum/protected/Web/Pages/FileSetView.php @@ -40,8 +40,8 @@ class FileSetView extends BaculumWebPage { } } - public function onLoad($param) { - parent::onLoad($param); + public function onPreRender($param) { + parent::onPreRender($param); if ($this->getPage()->IsCallBack || $this->getPage()->IsPostBack) { return; } diff --git a/gui/baculum/protected/Web/Portlets/DirectiveListTemplate.php b/gui/baculum/protected/Web/Portlets/DirectiveListTemplate.php index c955411fb..eb5d5c071 100644 --- a/gui/baculum/protected/Web/Portlets/DirectiveListTemplate.php +++ b/gui/baculum/protected/Web/Portlets/DirectiveListTemplate.php @@ -65,11 +65,16 @@ class DirectiveListTemplate extends ConfigListTemplate implements IActiveControl $cmd = $this->getCmdParam(); if ($this->getPage()->IsCallBack && (!$cmd || $cmd === 'show_all_directives') && method_exists($this, 'loadConfig')) { $this->loadConfig(); + } elseif (!$this->getPage()->IsCallBack && !$this->getPage()->IsPostBack) { + $this->display_directive = $this->getShow(); } - if ($this->getPage()->IsCallBack || $this->getPage()->IsPostBack) { - return; + } + + public function onLoad($param) { + parent::onLoad($param); + if (!$this->getPage()->IsCallBack && !$this->getPage()->IsPostBack && method_exists($this, 'loadConfig')) { + $this->loadConfig(); } - $this->display_directive = $this->getShow(); } public function getHost() {