]> git.ipfire.org Git - thirdparty/bacula.git/commitdiff
baculum: Changes to proper working list type controls on page load
authorMarcin Haba <marcin.haba@bacula.pl>
Thu, 8 Aug 2019 20:02:17 +0000 (22:02 +0200)
committerMarcin Haba <marcin.haba@bacula.pl>
Sat, 14 Dec 2019 14:55:29 +0000 (15:55 +0100)
gui/baculum/protected/Web/Pages/FileSetView.php
gui/baculum/protected/Web/Portlets/DirectiveListTemplate.php

index 2756091187c06b8ede5d398af23c7236b4c19229..306e5bf5aae61131ef88929b22c581bfe186b78d 100644 (file)
@@ -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;
                }
index c955411fb569438cec5007227be13647ae4ead3e..eb5d5c071d5685a48fc00adb81a6edbe39f5d9b3 100644 (file)
@@ -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() {