From 81aba9be8a81a51fd084e3b53f172559dc383f2c Mon Sep 17 00:00:00 2001 From: hickert Date: Fri, 9 Jun 2006 11:09:00 +0000 Subject: [PATCH] Fixed macro visible flag git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@3763 594d385d-05f5-0310-b6e9-bd551577e9d8 --- plugins/gofon/macro/class_divListMacros.inc | 6 ++-- .../macro/class_gofonMacroManagement.inc | 28 +++++++++++-------- 2 files changed, 20 insertions(+), 14 deletions(-) diff --git a/plugins/gofon/macro/class_divListMacros.inc b/plugins/gofon/macro/class_divListMacros.inc index b86f1dce0..1ab12136f 100755 --- a/plugins/gofon/macro/class_divListMacros.inc +++ b/plugins/gofon/macro/class_divListMacros.inc @@ -43,7 +43,7 @@ class divListMacro extends MultiSelectWindow /* set Page header */ $this->AddHeader(array("string" => " ", "attach" => "style='text-align:center;width:20px;'")); - $this->AddHeader(array("string" => _("Username")." / "._("Department"), "attach" => "style=''")); + $this->AddHeader(array("string" => _("macro name")." / "._("Department"), "attach" => "style=''")); $this->AddHeader(array("string" => _("Visible"), "attach" => "style='width:50px;'")); $this->AddHeader(array("string" => _("Actions"), "attach" => "style='width:60px;border-right:0px;text-align:right;'" )); @@ -100,9 +100,9 @@ class divListMacro extends MultiSelectWindow { $action = ""; + name='user_edit_%KEY%' title='"._("Edit macro")."'>"; $action .= ""; + name='user_del_%KEY%' title='"._("Delete macro")."'>"; $empty = ""; $macroimg = ""._("Macro").""; diff --git a/plugins/gofon/macro/class_gofonMacroManagement.inc b/plugins/gofon/macro/class_gofonMacroManagement.inc index 23b1720b3..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.= "

"; } @@ -294,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){ -- 2.30.2