Code

break in array index
[gosa.git] / plugins / admin / systems / class_componentGeneric.inc
index 3a8ab8d9ff06d062c56bf20a02ad87a4732d91d7..139444563bd4fcddf36b9c266d0833a5a5c4e155 100644 (file)
@@ -9,6 +9,7 @@ class componentGeneric extends plugin
 
   /* Generic terminal attributes */
   var $interfaces= array();
+  var $ignore_account= TRUE;
 
   /* Needed values and lists */
   var $base= "";
@@ -43,7 +44,7 @@ class componentGeneric extends plugin
   {
     /* Do we represent a valid phone? */
     if (!$this->is_account && $this->parent == NULL){
-      $display= "<img src=\"images/stop.png\" align=center>&nbsp;<b>".
+      $display= "<img alt=\"\" src=\"images/stop.png\" align=middle>&nbsp;<b>".
         _("This 'dn' has no network features.")."</b>";
       return($display);
     }
@@ -59,6 +60,9 @@ class componentGeneric extends plugin
     }
     $smarty->assign("base_select", $this->base);
 
+    /* Show Asterisk for required attribute ipHostNumber and macAddress */
+    $smarty->assign("staticAddress", "<font class=\"must\">*</font>");
+    
     /* Show main page */
     $smarty->assign("netconfig", dirname(__FILE__)."/network.tpl");
     return($smarty->fetch (get_template_path('component.tpl', TRUE)));
@@ -101,12 +105,15 @@ class componentGeneric extends plugin
     $message= array();
     $this->dn= "cn=".$this->cn.",ou=netdevices,ou=systems,".$this->base;
 
-    /* must: cn, macAddress */
+    /* must: cn, macAddress, ipHostNumber */
     if ($this->cn == "" && chkacl ($this->acl, "cn") == ""){
-      $message[]= "The required field 'Component name' is not set.";
+      $message[]= _("The required field 'Component name' is not set.");
     }
-    if ($this->macAddress == "" && chkacl ($this->acl, "macAddresscn") == ""){
-      $message[]= "The required field 'MAC-address' is not set.";
+    if ($this->macAddress == "" && chkacl ($this->acl, "macAddress") == ""){
+      $message[]= _("The required field 'MAC-address' is not set.");
+    }
+    if ($this->ipHostNumber == "" && chkacl ($this->acl, "ipHostNumber") == ""){
+      $message[]= _("The required field 'IP-address' is not set.");
     }
 
     $ui= get_userinfo();