X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=plugins%2Fadmin%2Fsystems%2Fclass_winGeneric.inc;h=82b847a796a17f1617bb9746cd58972f05f543f4;hb=6a798c99f3cd57b6e98610975ac80dcd7e094a90;hp=a58eacb704cb9bfe210e66b845ac3460e38b7d70;hpb=e299f0ca47a924516f2afbe4e922f2418b75315c;p=gosa.git
diff --git a/plugins/admin/systems/class_winGeneric.inc b/plugins/admin/systems/class_winGeneric.inc
index a58eacb70..82b847a79 100644
--- a/plugins/admin/systems/class_winGeneric.inc
+++ b/plugins/admin/systems/class_winGeneric.inc
@@ -13,8 +13,6 @@ class wingeneric extends plugin
/* Needed values and lists */
var $base= "";
var $cn= "";
- var $macAddress= "";
- var $ipHostNumber= "";
var $description= "";
var $orig_dn= "";
var $shadowLastChange="";
@@ -32,32 +30,19 @@ class wingeneric extends plugin
var $sambaSID="";
var $sambaPrimaryGroupSID="";
var $displayName="";
- var $sambaPwdCanChange2="";
var $sambaPwdMustChange="";
var $sambaNTPassword="";
var $sambaPwdLastSet="";
var $sambaAcctFlags="";
-
-
-
-
-
-
-
/* attribute list for save action */
- var $attributes = array("cn", "description", "macAddress", "ipHostNumber","shadowLastChange",
+ var $ignore_account= TRUE;
+ var $attributes = array("cn", "description","shadowLastChange",
"uidNumber","gidNumber","loginShell","gecos","shadowMin","shadowWarning",
"shadowInactive","uid","cn","sn","givenName","homeDirectory","sambaSID",
- "sambaPrimaryGroupSID","displayName", "sambaPwdCanChange2","sambaPwdMustChange",
+ "sambaPrimaryGroupSID","displayName", "sambaPwdMustChange",
"sambaNTPassword","sambaPwdLastSet","sambaAcctFlags");
- var $objectclasses= array("posixAccount","person","organizationalPerson","inetOrgPerson","gosaAccount","shadowAccount","sambaSamAccount","top", "device", "ipHost", "ieee802Device");
-
-
-// These are insertet !!!
-//"posixAccount","person","organizationalPerson","inetOrgPerson","gosaAccount","shadowAccount","sambaSamAccount"
-
-//$attrs2("shadowLastChange","uidNumber","gidNumber","loginShell","gecos","shadowMin","shadowWarning","shadowInactive","uid","cn","sn","givenName","homeDirectory","sambaSID","sambaPrimaryGroupSID","displayName","sambaPwdCanChange2","sambaPwdMustChange","sambaNTPassword","sambaPwdLastSet","sambaAcctFlags");
+ var $objectclasses= array("posixAccount","person","organizationalPerson","inetOrgPerson","gosaAccount","shadowAccount","sambaSamAccount","top");
function wingeneric ($config, $dn= NULL)
@@ -79,15 +64,23 @@ class wingeneric extends plugin
function execute()
{
+ /* Call parent execute */
+ plugin::execute();
+
/* Do we represent a valid phone? */
if (!$this->is_account && $this->parent == NULL){
- $display= "
".
+ $display= "
".
_("This 'dn' has no network features.")."";
return($display);
}
/* Fill templating stuff */
$smarty= get_smarty();
+
+ // Undefined index in wingeneric.tpl ...
+ $smarty->assign("macAddress","");
+ $smarty->assign("ipHostNumber","");
+
$smarty->assign("bases", $this->config->idepartments);
/* Assign attributes */
@@ -96,6 +89,8 @@ class wingeneric extends plugin
$smarty->assign("$attr", $this->$attr);
}
+ /* Show Asterisk for required attribute ipHostNumber and macAddress */
+ $smarty->assign("staticAddress", "*");
$smarty->assign("base_select", $this->base);
@@ -141,14 +136,19 @@ class wingeneric extends plugin
$message= array();
$this->dn= "cn=".$this->cn.",ou=netdevices,ou=systems,".$this->base;
+
/* must: cn, macAddress */
if ($this->cn == "" && chkacl ($this->acl, "cn") == ""){
- $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.";
+ $message[]= _("The required field 'Component name' 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();
$acl= get_permissions ($this->dn, $ui->subtreeACL);
$acl= get_module_permission($acl, "component", $this->dn);