From: hickert Date: Thu, 17 Apr 2008 07:19:54 +0000 (+0000) Subject: closes #421 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=04ae9598664860d0fe10ab2e1c943ff571aea383;p=gosa.git closes #421 git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@10528 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-plugins/systems/admin/systems/class_servGeneric.inc b/gosa-plugins/systems/admin/systems/class_servGeneric.inc index 57e50c016..dd5a5e2c2 100644 --- a/gosa-plugins/systems/admin/systems/class_servGeneric.inc +++ b/gosa-plugins/systems/admin/systems/class_servGeneric.inc @@ -327,8 +327,13 @@ class servgeneric extends plugin /* Warn the user, that this host is currently installing */ if($this->currently_installing && !$this->currently_installing_warned && !preg_match("/".normalizePreg(get_ou("incomingou"))."/",$this->orig_dn)){ + + /* Force aborting without message dialog */ + $message[] = ""; $this->currently_installing_warned = TRUE; - $message[] = _("This host is currently installing, if you really want to save it, save again."); + msg_dialog::display(_("Software deployment"), + _("This host is currently installing, if you really want to save it, press 'OK'."), + CONFIRM_DIALOG); } return ($message); diff --git a/gosa-plugins/systems/admin/systems/class_systemManagement.inc b/gosa-plugins/systems/admin/systems/class_systemManagement.inc index a24cf7bd7..29c87f2c8 100644 --- a/gosa-plugins/systems/admin/systems/class_systemManagement.inc +++ b/gosa-plugins/systems/admin/systems/class_systemManagement.inc @@ -37,6 +37,7 @@ class systems extends plugin /* Arp hanlding activated */ var $arp_handling_active = FALSE; + var $last_action = ""; function systems (&$config, $ui) { @@ -879,18 +880,29 @@ class systems extends plugin the user wants to save edited data. Check and save at this point. */ -# /* Dirty workaround - MSG_DIALOG - OK -# If a message dialog is shown and we press 'OK' -# then try to save again. -# */ -# foreach($_POST as $name => $value){ -# if(preg_match("/^MSG_OK/",$name)){ -# $_POST['edit_apply'] = TRUE; -# } -# } + /* Dirty workaround - MSG_DIALOG - OK + If a message dialog is shown and we press 'OK' + then try to save again. + */ + foreach($_POST as $name => $value){ + if(preg_match("/^MSG_OK/",$name)){ + $_POST[$this->last_action] = TRUE; + } + } if ((isset($_POST['edit_finish']) || isset($_POST['edit_apply'])) && (isset($this->systab->config)) || $save_object_directly){ + /* If the save routine gets interrupted by a confirm dialog, + store last action so we can trigger it again after 'Ok' was pressed. + (This is the case if a system gets modified while it is installing - GOsa si) + */ + $this->last_action = ""; + if(isset($_POST['edit_finish'])){ + $this->last_action = "edit_finish"; + }elseif(isset($_POST['edit_apply'])){ + $this->last_action = "edit_apply"; + } + /* Check tabs, will feed message array */ $message = array(); if(!$save_object_directly){