X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=plugins%2Fgofon%2Fmacro%2Fclass_gofonMacroManagement.inc;h=f494bc828a40af5f4f97467cbd40d61542d53036;hb=e51a29e05df3b0c0976a722d7bd3d11af70f1794;hp=cb28c7e132fdd056abb844b9e5995013258eee5b;hpb=bef4c77916f1ccc4484ebbb40ded0d3fc75782c7;p=gosa.git diff --git a/plugins/gofon/macro/class_gofonMacroManagement.inc b/plugins/gofon/macro/class_gofonMacroManagement.inc index cb28c7e13..f494bc828 100755 --- a/plugins/gofon/macro/class_gofonMacroManagement.inc +++ b/plugins/gofon/macro/class_gofonMacroManagement.inc @@ -124,7 +124,7 @@ class gofonMacro extends plugin /* Finish mac edit is triggered by the tabulator dialog, so the user wants to save edited data. Check and save at this point. */ - if ((isset($_POST['edit_finish'])) && (isset($this->macrotabs->config))){ + if ((isset($_POST['edit_finish']) || isset($_POST['edit_apply'])) && (isset($this->macrotabs->config))){ /* Check tabs, will feed message array */ $this->macrotabs->last= $this->macrotabs->current; @@ -138,15 +138,17 @@ class gofonMacro extends plugin $this->macrotabs->save(); gosa_log ("Macro object'".$this->dn."' has been saved"); - /* macro has been saved successfully, remove lock from - LDAP. */ - if ($this->dn != "new"){ - del_lock ($this->dn); - } + if (!isset($_POST['edit_apply'])){ + /* macro has been saved successfully, remove lock from + LDAP. */ + if ($this->dn != "new"){ + del_lock ($this->dn); + } - unset ($this->macrotabs); - $this->macrotabs= NULL; - unset ($_SESSION['objectinfo']); + unset ($this->macrotabs); + $this->macrotabs= NULL; + unset ($_SESSION['objectinfo']); + } } else { /* Ok. There seem to be errors regarding to the tab data, show message and continue as usual. */ @@ -258,8 +260,12 @@ class gofonMacro extends plugin /* Don't show buttons if tab dialog requests this */ if (!$this->macrotabs->by_object[$this->macrotabs->current]->dialog){ $display.= "

\n"; - $display.= "\n"; + $display.= "\n"; $display.= " \n"; + if ($this->dn != "new"){ + $display.= "\n"; + $display.= " \n"; + } $display.= "\n"; $display.= "

"; } @@ -273,6 +279,7 @@ class gofonMacro extends plugin /* Return rendered main page */ /* Display dialog with system list */ + $this->DivListMacro->parent = $this; $this->DivListMacro->execute(); /* Add departments if subsearch is disabled */ @@ -293,7 +300,7 @@ class gofonMacro extends plugin $Regex = $this->DivListMacro->Regex; $Filter = "(&(cn=".$Regex.")(objectClass=goFonMacro))"; $Flags = GL_SIZELIMIT; - $Attrs = array("cn","description","displayName"); + $Attrs = array("cn","description","displayName","goFonMacroVisible"); /* Prepare for ls or search*/ if($SubSearch){