From d957b1ca30adf46ddeae723edc7489b53ee1b0e2 Mon Sep 17 00:00:00 2001 From: hickert Date: Mon, 20 Aug 2007 11:20:10 +0000 Subject: [PATCH] Add gotomasses remove template git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@7074 594d385d-05f5-0310-b6e9-bd551577e9d8 --- plugins/addons/gotomasses/class_gotomasses.inc | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/plugins/addons/gotomasses/class_gotomasses.inc b/plugins/addons/gotomasses/class_gotomasses.inc index 9bca37ddc..ce1b6395c 100644 --- a/plugins/addons/gotomasses/class_gotomasses.inc +++ b/plugins/addons/gotomasses/class_gotomasses.inc @@ -33,6 +33,7 @@ class gotomasses extends plugin function execute() { + $smarty = get_smarty(); /************ * Handle posts ************/ @@ -55,7 +56,16 @@ class gotomasses extends plugin /* Remove entry from list */ if($s_action == "remove" && isset($this->tasks[$s_entry])){ - unset($this->tasks[$s_entry]); + $smarty->assign("info",_("Your are about to delete a gotomasses task.")); + $this->current = $s_entry; + return($smarty->fetch(get_template_path('remove.tpl', TRUE))); + } + + /* Remove entry, remove is confirmed */ + if($this->current != -1 && isset($_POST['delete_confirm'])){ + unset($this->tasks[$this->current]); + $this->current = -1; + $this->save(); } /* Edit selected entry */ @@ -93,6 +103,7 @@ class gotomasses extends plugin } $this->dialog = FALSE; $this->current = -1; + $this->save(); } } @@ -107,7 +118,6 @@ class gotomasses extends plugin * Handle Divlist ************/ - $smarty = get_smarty(); $plug = $_GET['plug']; $divlist = new MultiSelectWindow($this->config,"GotoMasses","gotomassses"); $divlist->SetSummary(_("Gotomasses tasks")); -- 2.30.2