From: cajus Date: Thu, 3 Aug 2006 05:34:04 +0000 (+0000) Subject: Updated hotplug dialog X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=d262ab48e3ed3cdb68e9629706dcffe0a933db55;p=gosa.git Updated hotplug dialog git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@4370 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/Changelog b/Changelog index 0cddad6ee..ca97ee475 100644 --- a/Changelog +++ b/Changelog @@ -2,6 +2,7 @@ GOsa2 changelog =============== * gosa 2.5.3 + - Fixed problem in reloading departments when we've PHP4 - Fixed gotoPrinter membership problem. - Fixed environment shares, only available shares will be displayed (gosaUnitTag was ignored) - Fixed saving of inherited workstation settings @@ -18,6 +19,7 @@ GOsa2 changelog - Fixed ACL handling to *not* show the admin user dialog when configured for self modify only - Fixed problem when changing passwords via "My account" + - Added more information to hotplug devices. * gosa 2.5.2 - Fixed current main base not beeing set when editing non tabbed diff --git a/plugins/personal/environment/class_hotplugDialog.inc b/plugins/personal/environment/class_hotplugDialog.inc index 210d787a7..dbb082141 100644 --- a/plugins/personal/environment/class_hotplugDialog.inc +++ b/plugins/personal/environment/class_hotplugDialog.inc @@ -9,25 +9,27 @@ class hotplugDialog extends plugin /* attribute list for save action */ var $ignore_account = TRUE; - var $attributes = array("HOT_name","HOT_description","HOT_id"); + var $attributes = array("HOT_name","HOT_description","HOT_id","HOT_produkt","HOT_vendor"); var $objectclasses = array("whatever"); var $use_existing = false; var $HOT_name = ""; var $HOT_description = ""; var $HOT_id = ""; + var $HOT_produkt = ""; + var $HOT_vendor = ""; var $hotplugDevices = ""; var $hotplugDeviceList = array(); var $regex = "*"; var $depselect = "/"; var $deplist = "/"; + var $skipThese = array(); - - - function hotplugDialog ($config, $dn= NULL,$use_existing=false ) + function hotplugDialog ($config, $dn= NULL,$use_existing=false ,$skipThese = array()) { $this->use_existing = $use_existing; + $this->skipThese = $skipThese; plugin::plugin ($config, $dn); $this->depselect = $this->config->current['BASE']; } @@ -118,6 +120,12 @@ class hotplugDialog extends plugin if((empty($this->HOT_id))||(preg_match("/[\|]/i",$this->HOT_id))){ $message[]=_("Please specify a valid id."); } + if((empty($this->HOT_vendor))||(preg_match("/[\|]/i",$this->HOT_vendor))){ + $message[]=_("Please specify a valid id."); + } + if((empty($this->HOT_produkt))||(preg_match("/[\|]/i",$this->HOT_produkt))){ + $message[]=_("Please specify a valid id."); + } $ldap = $this->config->get_ldap_link(); $ldap->search("(&(objectClass=gotoEnvironment)(gotoHotplugDevice=".$this->HOT_name."*))",array("gotoHotplugDevice")); @@ -141,9 +149,11 @@ class hotplugDialog extends plugin /* return generated entry from input fields*/ if(!$this->use_existing){ $a_return=array(); - $a_return[$this->HOT_name]['name']= $this->HOT_name; - $a_return[$this->HOT_name]['description']= $this->HOT_description; - $a_return[$this->HOT_name]['id']= $this->HOT_id; + $a_return[$this->HOT_name]['name'] = $this->HOT_name; + $a_return[$this->HOT_name]['description'] = $this->HOT_description; + $a_return[$this->HOT_name]['id'] = $this->HOT_id; + $a_return[$this->HOT_name]['produkt'] = $this->HOT_produkt; + $a_return[$this->HOT_name]['vendor'] = $this->HOT_vendor; return($a_return); }else{ $entries = array(); @@ -170,12 +180,27 @@ class hotplugDialog extends plugin $tmp = split("\|",$device); if(preg_match("/^".str_replace("*","",$this->regex).".*/i",$tmp[0])){ + + if(in_array($tmp[0],$this->skipThese)) continue; + $a_return[$tmp[0]]= $tmp[0]." [".$tmp[1]."] ".$tmp[2]; $tmp2['name'] = $tmp[0]; - $tmp2['description'] = $tmp[1]; + $tmp2['description'] = $tmp[1]; $tmp2['id'] = $tmp[2]; + /* Produkt ID */ + if(!isset($tmp[3])){ + $tmp[3] = ""; + } + /* Vendor ID */ + if(!isset($tmp[4])){ + $tmp[4] = ""; + } + + $tmp2['produkt'] = $tmp[3]; + $tmp2['vendor'] = $tmp[4]; + $this->hotplugDeviceList[$tmp[0]]=$tmp2; } } diff --git a/plugins/personal/environment/hotplugDialogNew.tpl b/plugins/personal/environment/hotplugDialogNew.tpl index 635e93c96..9704ebeb6 100644 --- a/plugins/personal/environment/hotplugDialogNew.tpl +++ b/plugins/personal/environment/hotplugDialogNew.tpl @@ -4,7 +4,7 @@ -
+
{$must} @@ -24,12 +24,27 @@ + + + + + + + + +
{$must} + + +
{$must}  
{$must} + + +