Code

Updated removal of systems
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 17 Mar 2010 14:39:30 +0000 (14:39 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 17 Mar 2010 14:39:30 +0000 (14:39 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@16781 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-plugins/systems/admin/systems/class_systemManagement.inc

index 03fcb4976b6de97e220477593fc680675553e958..7fee83a007314d8fcc6700e59583936d0eae577d 100644 (file)
@@ -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]).')&nbsp;-&nbsp;'.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')));
     }
   }