diff --git a/plugins/admin/groups/class_groupManagement.inc b/plugins/admin/groups/class_groupManagement.inc
index ed891cc5951eb2bc61fe53638b98e7cf021e3798..637abae5b9309b5a85f151b73377625fdc7b912a 100644 (file)
/* Finish group 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->grouptab->config)) ){
+ if ((isset($_POST['edit_finish']) || isset($_POST['edit_apply'])) && (isset($this->grouptab->config)) ){
/* Check tabs, will feed message array
Save, or display error message? */
$this->grouptab->save();
gosa_log ("Group object'".$this->dn."' has been saved");
- /* Group has been saved successfully, remove lock from LDAP. */
- if ($this->dn != "new"){
- del_lock ($this->dn);
+ if (!isset($_POST['edit_apply'])){
+ /* Group has been saved successfully, remove lock from LDAP. */
+ if ($this->dn != "new"){
+ del_lock ($this->dn);
+ }
+
+ /* There's no page reload so we have to read new users at this point. */
+ //$this->reload ();
+ unset ($this->grouptab);
+ $this->grouptab= NULL;
+ unset ($_SESSION['objectinfo']);
}
-
- /* There's no page reload so we have to read new users at this point. */
- //$this->reload ();
- unset ($this->grouptab);
- $this->grouptab= NULL;
- unset ($_SESSION['objectinfo']);
-
} else {
/* Ok. There seem to be errors regarding to the tab data,
show message and continue as usual. */
/* Cancel dialogs */
if (isset($_POST['edit_cancel']) || isset($_POST['password_cancel'])){
- del_lock ($this->grouptab->dn);
+ if(isset($this->grouptab->dn)){
+ del_lock ($this->grouptab->dn);
+ }
unset ($this->grouptab);
$this->grouptab= NULL;
unset($_SESSION['objectinfo']);
$display= $this->grouptab->execute();
/* Don't show buttons if tab dialog requests this */
- if (!$this->grouptab->by_object[$this->grouptab->current]->dialog){
- $display.= "<p style=\"text-align:right\">\n";
- $display.= "<input type=submit name=\"edit_finish\" value=\""._("Save")."\">\n";
- $display.= " \n";
- $display.= "<input type=submit name=\"edit_cancel\" value=\""._("Cancel")."\">\n";
- $display.= "</p>";
+ if(isset($this->grouptab->by_object)){
+ if (!$this->grouptab->by_object[$this->grouptab->current]->dialog){
+ $display.= "<p style=\"text-align:right\">\n";
+ $display.= "<input type=submit name=\"edit_finish\" style=\"width:80px\" value=\""._("Ok")."\">\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>";
+ }
}
return ($display);
}
+
+ /* Check if there is a snapshot dialog open */
+ $base = $this->DivListGroup->selectedBase;
+ if($str = $this->showSnapshotDialog($base,$this->get_used_snapshot_bases())){
+ return($str);
+ }
+
/* Display dialog with group list */
$this->DivListGroup->parent = $this;
$this->DivListGroup->execute();
return($this->DivListGroup->Draw());
}
+
+ /* Return departments, that will be included within snapshot detection */
+ function get_used_snapshot_bases()
+ {
+ return(array(get_groups_ou().$this->DivListGroup->selectedBase));
+ }
+
+
+
function reload($CreatePosixsList=false)
{
$this->grouplist = array();
function check() { }
function adapt_from_template($dn) { }
function password_change_needed() { }
- function show_header($button_text, $text, $disabled= FALSE) { }
}
// vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
?>