From 6ce719526b9249ebe0ceb577794cbb7ee232e8af Mon Sep 17 00:00:00 2001 From: hickert Date: Thu, 19 May 2011 08:19:23 +0000 Subject: [PATCH] Added remove confirm dialog git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@20875 594d385d-05f5-0310-b6e9-bd551577e9d8 --- .../class_ConfigManagement.inc | 22 +++++++++++++++++++ .../class_cfgMgmtMangement.inc | 8 ++++++- 2 files changed, 29 insertions(+), 1 deletion(-) diff --git a/gosa-plugins/goto-ng/admin/newConfigManagement/class_ConfigManagement.inc b/gosa-plugins/goto-ng/admin/newConfigManagement/class_ConfigManagement.inc index 0b23aaae8..20cbecf33 100644 --- a/gosa-plugins/goto-ng/admin/newConfigManagement/class_ConfigManagement.inc +++ b/gosa-plugins/goto-ng/admin/newConfigManagement/class_ConfigManagement.inc @@ -530,6 +530,28 @@ class ConfigManagement extends plugin */ function removeEntry($ids) { + $this->ids = $ids; + + $names = array(); + foreach($ids as $id){ + $item = $this->dataModel->getItemByDn($id); + $names["({$item['type']}) {$item['path']})"] = $item['name']; + } + + $smarty = get_smarty(); + $smarty = get_smarty(); + $smarty->assign("info", msgPool::deleteInfo($names)); + $smarty->assign("multiple", true); + + return($smarty->fetch(get_template_path('removeEntries.tpl'))); + } + + function remove_confirmed() + { + echo 'timmay'; + return; + + $ids = $this->ids; foreach($ids as $id){ $item = $this->dataModel->getItemByDn($id); diff --git a/gosa-plugins/goto-ng/admin/newConfigManagement/class_cfgMgmtMangement.inc b/gosa-plugins/goto-ng/admin/newConfigManagement/class_cfgMgmtMangement.inc index 7d6f06678..3ea534deb 100644 --- a/gosa-plugins/goto-ng/admin/newConfigManagement/class_cfgMgmtMangement.inc +++ b/gosa-plugins/goto-ng/admin/newConfigManagement/class_cfgMgmtMangement.inc @@ -233,6 +233,12 @@ class cfgMgmtMangement extends management } + function removeEntryConfirmed($action="",$target=array(),$all=array(), + $altTabClass="",$altTabType="", $altAclCategory="",$altAclPlugin="") + { + return($this->parent->remove_confirmed()); + } + function saveItemChanges() { $this->parent->saveItemChanges(); @@ -240,7 +246,7 @@ class cfgMgmtMangement extends management function removeEntryRequested($action="",$target=array(),$all=array(), $altTabClass ="", $altTabType = "", $altAclCategory="") { - $this->parent->removeEntry($target); + return($this->parent->removeEntry($target)); } function newEntry($action="",$target=array(),$all=array(), $altTabClass ="", $altTabType = "", $altAclCategory="") -- 2.30.2