Code

Allow inheritance of gotoXDriver
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 11 May 2009 05:43:12 +0000 (05:43 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 11 May 2009 05:43:12 +0000 (05:43 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@13639 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-plugins/goto/admin/systems/goto/class_workstationService.inc
gosa-plugins/goto/admin/systems/goto/workstationService.tpl

index ff80bbc62c130ed99f6bfa2c6c62e1a5c270ffea..41f00a8f8a8887de0467d2a7c7ba2bafdd2144c3 100644 (file)
@@ -184,7 +184,7 @@ class workservice extends plugin
     $ldap->search("(&(objectClass=gotoWorkstationTemplate)(member=".LDAP::prepare4filter($this->dn)."))");
     if ($ldap->count() == 1){
       $map= array("gotoXResolution", "gotoXColordepth", "gotoXKbModel", "gotoXKbLayout",
-                  "gotoXKbVariant", "gotoXMouseType", "gotoXMouseport");
+                  "gotoXKbVariant", "gotoXMouseType", "gotoXMouseport", "gotoXDriver");
       $attrs= $ldap->fetch();
 
       foreach ($map as $name){
@@ -193,6 +193,9 @@ class workservice extends plugin
         }
         
         switch ($name){
+          case 'gotoXDriver':
+            $this->XDrivers= array('default' => _("inherited").' ['.$attrs[$name][0].']' ) + $this->XDrivers;
+            break;
           case 'gotoXResolution':
             $this->XResolutions= array('default' => _("inherited").' ['.$attrs[$name][0].']' ) + $this->XResolutions;
             break;
@@ -478,8 +481,13 @@ class workservice extends plugin
           "i128", "i740", "i810", "intel", "imstt", "mga", "neomagic", "newport", "nsc",  "nv", "nvidia",
           "r128", "radeon", "rendition", "s3", "s3virge", "savage", "siliconmotion",
           "sis", "tdfx", "tga", "trident", "tseng", "vesa", "vga", "vmware");
+    } 
+    $tmp = array();
+    foreach($drivers as $name){
+      $tmp[$name] = $name;
     }
-    return($drivers);
+
+    return($tmp);
   }
 
 
index 19d3896b16c85947967d8ee4445a566e718cd627..b0172630cb7a8e50e7527e222ed929f89df6e430 100644 (file)
 
 {render acl=$gotoXDriverACL}
       <select id="gotoXDriver" name="gotoXDriver" title="{t}Choose graphic driver that is needed by the installed graphic board{/t}">
-       {html_options values=$XDrivers output=$XDrivers selected=$gotoXDriver_select}
+       {html_options options=$XDrivers selected=$gotoXDriver_select}
       </select>
 {/render}