From: hickert Date: Mon, 20 Aug 2007 12:06:47 +0000 (+0000) Subject: Added apply button to gotomasses X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=125f6a9b73293048b87b6f044bb156330ef62c60;p=gosa.git Added apply button to gotomasses git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@7076 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/plugins/addons/gotomasses/class_goto_task.inc b/plugins/addons/gotomasses/class_goto_task.inc index a9c81ba5e..f7b36a474 100644 --- a/plugins/addons/gotomasses/class_goto_task.inc +++ b/plugins/addons/gotomasses/class_goto_task.inc @@ -21,6 +21,7 @@ class goto_task extends plugin var $Actions = array(); var $OGroup = ""; var $OGroups = array(); + var $new = FALSE; var $attributes = array("OGroup","Minute","Hour","Day","Month","Weekday","Action","Comment","Target"); @@ -46,6 +47,8 @@ class goto_task extends plugin } } } + }else{ + $this->new = TRUE; } /* Create ogroup select list */ @@ -161,6 +164,7 @@ class goto_task extends plugin $smarty->assign("Actions" , $this->Actions); $smarty->assign("Target_list" , $divlist->DrawList()); + $smarty->assign("new" , $this->new); return ($smarty->fetch (get_template_path('goto_task.tpl', TRUE))); } diff --git a/plugins/addons/gotomasses/class_gotomasses.inc b/plugins/addons/gotomasses/class_gotomasses.inc index ce1b6395c..9af6b1777 100644 --- a/plugins/addons/gotomasses/class_gotomasses.inc +++ b/plugins/addons/gotomasses/class_gotomasses.inc @@ -88,7 +88,7 @@ class gotomasses extends plugin } /* Close dialog */ - if(isset($_POST['save_goto_task']) && is_object($this->dialog)){ + if((isset($_POST['save_goto_task']) || isset($_POST['apply_goto_task'])) && is_object($this->dialog) ){ $this->dialog->save_object(); $msgs = $this->dialog->check(); if(count($msgs)){ @@ -101,12 +101,14 @@ class gotomasses extends plugin }else{ $this->tasks[] = $this->dialog->save(); } - $this->dialog = FALSE; - $this->current = -1; + if(!isset($_POST['apply_goto_task']) && $this->current != -1){ + $this->dialog = FALSE; + $this->current = -1; + } $this->save(); } } - + /* Display dialogs if currently opened */ if(is_object($this->dialog)){ $this->dialog->save_object(); diff --git a/plugins/addons/gotomasses/goto_task.tpl b/plugins/addons/gotomasses/goto_task.tpl index c673e2210..3e8ce9ed5 100644 --- a/plugins/addons/gotomasses/goto_task.tpl +++ b/plugins/addons/gotomasses/goto_task.tpl @@ -188,6 +188,9 @@

- - + +{if !$new} + +{/if} +