diff --git a/plugins/admin/applications/class_applicationManagement.inc b/plugins/admin/applications/class_applicationManagement.inc
index e71dee31665b7293549b0385b4e8b93ad14a886a..4cb3ccd04b8c9c39f39132ede58b5342fc3bce90 100644 (file)
$ldap = $this->config->get_ldap_link();
$dn = "ou=apps,".$base;
$ret = array();
- $ret [$base] = "/";
+ $ret ["ou=apps,".$base] = "/";
$ldap->cd($dn);
$ldap->search("objectClass=organizationalUnit",array("ou"));
/* Finish apps 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->apptabs->config))){
+ if ((isset($_POST['edit_finish']) || isset($_POST['edit_apply']) ) && (isset($this->apptabs->config))){
/* Check tabs, will feed message array */
$this->apptabs->last= $this->apptabs->current;
$this->apptabs->save();
gosa_log ("Application object'".$this->dn."' has been saved");
- /* Application has been saved successfully, remove lock from
- LDAP. */
- if ($this->dn != "new"){
- del_lock ($this->dn);
+ if (!isset($_POST['edit_apply'])){
+ /* Application has been saved successfully, remove lock from
+ LDAP. */
+ if ($this->dn != "new"){
+ del_lock ($this->dn);
+ }
+ unset ($this->apptabs);
+ $this->apptabs= NULL;
+ unset ($_SESSION['objectinfo']);
}
- unset ($this->apptabs);
- $this->apptabs= NULL;
- unset ($_SESSION['objectinfo']);
} 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->apptabs->by_object[$this->apptabs->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";
+ 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>";
}
Dialog display
****************/
+ /* Check if there is a snapshot dialog open */
+ $base = $this->DivListApplication->selectedBase;
+ if($str = $this->showSnapshotDialog($base,$this->get_used_snapshot_bases($base))){
+ return($str);
+ }
+
/* Display dialog with system list */
$this->DivListApplication->parent = $this;
$this->DivListApplication->execute();
}
+ /* Return departments, that will be included within snapshot detection */
+ function get_used_snapshot_bases(){
+ if($this->DivListApplication->selectedRelease == "main"){
+ return(array($this->DivListApplication->selectedBase));
+ }else{
+ return(array($this->DivListApplication->selectedRelease));
+ }
+ }
+
+
function reload()
{
$this->applications= array();