Code

git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@576 594d385d-05f5-0310...
[gosa.git] / plugins / admin / systems / class_phoneGeneric.inc
index c0d2d8ba23ac567bc819a51488a85df0135c09fc..417b6b31cf3dd36209ac27cf8baaccd0813ca454 100644 (file)
@@ -9,6 +9,7 @@ class phoneGeneric extends plugin
 
   /* Generic terminal attributes */
   var $interfaces= array();
+  var $ignore_account= TRUE;
 
   /* Needed values and lists */
   var $base= "";
@@ -58,7 +59,10 @@ class phoneGeneric extends plugin
       $smarty->assign("$attr", $this->$attr);
     }
     $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('phone.tpl', TRUE)));
@@ -101,15 +105,18 @@ class phoneGeneric extends plugin
     $message= array();
     $this->dn= "cn=".$this->cn.",ou=phones,ou=systems,".$this->base;
 
-    /* must: cn, macAddress */
+    /* must: cn, macAddress, ipHostNumber */
     if ($this->cn == "" && chkacl ($this->acl, "cn") == ""){
-      $message[]= "The required field 'Phone name' is not set.";
+      $message[]= _("The required field 'Phone name' is not set.");
     }
     if ($this->cn == "0" && chkacl ($this->acl, "cn") == ""){
-      $message[]= "The 'Phone name' '0' is reserved and cannot be used.";
+      $message[]= _("The 'Phone name' '0' is reserved and cannot be used.");
+    }
+    if ($this->macAddress == "" && chkacl ($this->acl, "macAddress") == ""){
+      $message[]= _("The required field 'MAC-address' is not set.");
     }
-    if ($this->macAddress == "" && chkacl ($this->acl, "macAddresscn") == ""){
-      $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();