Code

Made hotplug device deletion [] multiple
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 31 May 2006 03:48:45 +0000 (03:48 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 31 May 2006 03:48:45 +0000 (03:48 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@3569 594d385d-05f5-0310-b6e9-bd551577e9d8

plugins/personal/environment/class_environment.inc
plugins/personal/environment/environment.tpl

index dd9342cef22b5d4b3a2f745a35cac9820f3a12bf..c68b5af1c5261e4b6877c3a63de44b47f36c5d4b 100644 (file)
@@ -68,8 +68,8 @@ class environment extends plugin
                                     "gotoLogonScripts","gotoLogonScript",
                                     "gotoPrinter", "gosaDefaultPrinter",
                                     "gotoShares","gotoShare",
-                                    "gotoKioskProfile","gotoKioskProfiles",
-                                    "gotoHotplugDevice");
+                                    "gotoKioskProfile","gotoKioskProfiles"
+                                    );
   var $objectclasses      = array("gotoEnvironment"); // Specifies the objectClass which contains the attributes edited here 
   var $cn;
   var $OrigCn;
@@ -577,7 +577,9 @@ class environment extends plugin
 
     /* We have to delete the selected hotplug from the list*/
     if((isset($_POST['gotoHotplugDeviceDel']))&&(isset($_POST['gotoHotplugDevice']))){
-      unset($this->gotoHotplugDevices[$_POST['gotoHotplugDevice']]);
+      foreach($_POST['gotoHotplugDevice'] as $name){
+        unset($this->gotoHotplugDevices[$name]);
+      }
     }
 
     /* There are already defined hotplugs from other users we could use */
index 1af617c146cbb89bec722dbaddf2517884eb2b04..5daf8ef2d5aa62c67847c9edabe6e0e2d3c9bf96 100644 (file)
        <table style="width:100%" summary="{t}Hotplug device settings{/t}">
                <tr>
                        <td>
-                               <select name="gotoHotplugDevice" {$gotoHotplugDeviceACL} size=5  style="width:100%;" id="gotoHotplugDevice">
-       {html_options values=$gotoHotplugDeviceKeys output=$gotoHotplugDevices}
-       <option disabled>&nbsp;</option>
+                               <select name="gotoHotplugDevice[]" {$gotoHotplugDeviceACL} size=5  style="width:100%;" id="gotoHotplugDevice" multiple>
+                                       {html_options values=$gotoHotplugDeviceKeys output=$gotoHotplugDevices}
+                                       <option disabled>&nbsp;</option>
                                </select>
                        </td>
                </tr>