Code

Column name changed.
[gosa.git] / gosa-plugins / goto / admin / systems / goto / class_ArpNewDevice.inc
index 79009908e9f2a6320c08314d92cb47091178e92a..fb9a41b58f807669c0d72c52ed884a408a424eac 100644 (file)
@@ -11,7 +11,6 @@ class ArpNewDevice extends plugin
   function ArpNewDevice ($config, $dn= NULL, $parent= NULL)
   {
     plugin :: plugin($config,$dn);
-    $this->cn ="";
     $this->netConfigDNS = new termDNS($this->config,$this,$this->objectclasses);
     $this->acl = "#all#";
     $this->netConfigDNS->acl = $this->acl;
@@ -36,7 +35,7 @@ class ArpNewDevice extends plugin
       $this->dialog = FALSE;
     }
 
-    return($smarty->fetch (get_template_path('ArpNewDevice.tpl', TRUE)));
+    return($smarty->fetch (get_template_path('ArpNewDevice.tpl', TRUE,dirname(__FILE__))));
   }
 
   function check()
@@ -44,7 +43,7 @@ class ArpNewDevice extends plugin
     $message= plugin::check();
     $message= array_merge($message, $this->netConfigDNS->check());
     if(empty($this->cn)){
-      $message[] = _("Please specify a valid dns name.");
+      $message[] = msgPool::required(_("Name"));
     }
     return($message);
   }
@@ -66,7 +65,9 @@ class ArpNewDevice extends plugin
     $ldap = $this->config->get_ldap_link();
     $ldap->cd($this->config->current['BASE']);
     $ldap->rmdir_recursive($this->dn);
-    show_ldap_error($ldap->get_error(),_("Could not remove arp-alert device after writing dns and dhcp configuration."));
+    if (!$ldap->success()){
+      msg_dialog::display(_("LDAP error"), msgPool::ldaperror($ldap->get_error(), $key->dn, LDAP_DEL, get_class()));
+    }
   }
 }