diff --git a/plugins/gofon/macro/class_gofonMacroManagement.inc b/plugins/gofon/macro/class_gofonMacroManagement.inc
index cb28c7e132fdd056abb844b9e5995013258eee5b..f494bc828a40af5f4f97467cbd40d61542d53036 100755 (executable)
/* Finish mac edit is triggered by the tabulator dialog, so
the user wants to save edited data. Check and save at this
point. */
/* 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;
/* Check tabs, will feed message array */
$this->macrotabs->last= $this->macrotabs->current;
$this->macrotabs->save();
gosa_log ("Macro object'".$this->dn."' has been saved");
$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. */
} else {
/* Ok. There seem to be errors regarding to the tab data,
show message and continue as usual. */
/* Don't show buttons if tab dialog requests this */
if (!$this->macrotabs->by_object[$this->macrotabs->current]->dialog){
$display.= "<p style=\"text-align:right\">\n";
/* Don't show buttons if tab dialog requests this */
if (!$this->macrotabs->by_object[$this->macrotabs->current]->dialog){
$display.= "<p style=\"text-align:right\">\n";
- $display.= "<input type=\"submit\" name=\"edit_finish\" value=\""._("Save")."\">\n";
+ $display.= "<input type=\"submit\" name=\"edit_finish\" style=\"width:80px\" value=\""._("Ok")."\">\n";
$display.= " \n";
$display.= " \n";
+ if ($this->dn != "new"){
+ $display.= "<input type=submit name=\"edit_apply\" value=\""._("Apply")."\">\n";
+ $display.= " \n";
+ }
$display.= "<input type=\"submit\" name=\"edit_cancel\" value=\""._("Cancel")."\">\n";
$display.= "</p>";
}
$display.= "<input type=\"submit\" name=\"edit_cancel\" value=\""._("Cancel")."\">\n";
$display.= "</p>";
}
/* Return rendered main page */
/* Display dialog with system list */
/* Return rendered main page */
/* Display dialog with system list */
+ $this->DivListMacro->parent = $this;
$this->DivListMacro->execute();
/* Add departments if subsearch is disabled */
$this->DivListMacro->execute();
/* Add departments if subsearch is disabled */
$Regex = $this->DivListMacro->Regex;
$Filter = "(&(cn=".$Regex.")(objectClass=goFonMacro))";
$Flags = GL_SIZELIMIT;
$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){
/* Prepare for ls or search*/
if($SubSearch){