From 125f6a9b73293048b87b6f044bb156330ef62c60 Mon Sep 17 00:00:00 2001 From: hickert Date: Mon, 20 Aug 2007 12:06:47 +0000 Subject: [PATCH] Added apply button to gotomasses git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@7076 594d385d-05f5-0310-b6e9-bd551577e9d8 --- plugins/addons/gotomasses/class_goto_task.inc | 4 ++++ plugins/addons/gotomasses/class_gotomasses.inc | 10 ++++++---- plugins/addons/gotomasses/goto_task.tpl | 7 +++++-- 3 files changed, 15 insertions(+), 6 deletions(-) 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} +

-- 2.30.2