Code

Updated removal info
[gosa.git] / gosa-core / include / class_management.inc
index 9def195e6f43937eb01871eb80fa36898f74356d..e2fce7894a4d8c07f0fe6f06880826e78db76f43 100644 (file)
@@ -277,6 +277,9 @@ class 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();
 
@@ -305,14 +308,27 @@ class 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("info", msgPool::deleteInfo($dns_names));
       $smarty->assign("multiple", true);
       return($smarty->fetch(get_template_path('removeEntries.tpl')));
     }