From 7977f8bee97a1615016412b6afb7968094ba88bd Mon Sep 17 00:00:00 2001 From: hickert Date: Wed, 17 Mar 2010 14:39:30 +0000 Subject: [PATCH] Updated removal of systems git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@16781 594d385d-05f5-0310-b6e9-bd551577e9d8 --- .../admin/systems/class_systemManagement.inc | 23 +++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/gosa-plugins/systems/admin/systems/class_systemManagement.inc b/gosa-plugins/systems/admin/systems/class_systemManagement.inc index 03fcb4976..7fee83a00 100644 --- a/gosa-plugins/systems/admin/systems/class_systemManagement.inc +++ b/gosa-plugins/systems/admin/systems/class_systemManagement.inc @@ -553,6 +553,9 @@ class systemManagement extends management */ protected function removeEntryRequested($action="",$target=array(),$all=array()) { + // Close dialogs and remove locks for currently handled dns + $this->cancelEdit(); + $disallowed = array(); $this->dns = array(); @@ -589,16 +592,28 @@ class systemManagement extends management // Add locks $dns_names = array(); + $types = array(); + $h = $this->getHeadpage(); + + // Build list of object -labels + foreach($h->objectTypes as $type){ + $map[$type['objectClass']]= $type['label']; + } + foreach($this->dns as $dn){ - $dns_names[] =LDAP::fix($dn); + $tmp = $h->getType($dn); + if(isset($map[$tmp])){ + $dns_names[] = '('._($map[$tmp]).') - '.LDAP::fix($dn); + }else{ + $dns_names[] =LDAP::fix($dn); + } } add_lock ($this->dns, $this->ui->dn); // Display confirmation dialog. $smarty = get_smarty(); - $smarty->assign("info", msgPool::deleteInfo($dns_names,_($this->objectName))); - $smarty->assign("multiple", true); - return($smarty->fetch(get_template_path('remove.tpl', TRUE))); + $smarty->assign("info", msgPool::deleteInfo($dns_names)); + return($smarty->fetch(get_template_path('removeEntries.tpl'))); } } -- 2.30.2