Code

Printer are multiple lists, you can delete multiple & add multiple
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 26 Apr 2006 12:20:59 +0000 (12:20 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 26 Apr 2006 12:20:59 +0000 (12:20 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@3121 594d385d-05f5-0310-b6e9-bd551577e9d8

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

index 3e436a886dbfc3f4dc1a0b2329ec7d4bc6d9dd63..562b0278f239c887b137dcd01e7c0ebcac1b9aeb 100644 (file)
@@ -630,8 +630,12 @@ class environment extends plugin
         $this->dialog->save_object();
         $tmp = $this->dialog->save();
         $tmp2= $this->dialog->getPrinter(true);
-        $this->gotoPrinter[$tmp]=$tmp2[$tmp];
-        $this->gotoPrinter[$tmp]['mode']="user";
+  
+        foreach($tmp as $pname){
+          $this->gotoPrinter[$pname]=$tmp2[$pname];
+          $this->gotoPrinter[$pname]['mode']="user";
+        }
+  
         $this->is_dialog=false;
         unset($this->dialog);
         $this->dialog   =NULL;
@@ -640,7 +644,9 @@ class environment extends plugin
   
     if((isset($_POST['gotoPrinterDel']))&&(isset($_POST['gotoPrinterSel']))&&(!empty($_POST['gotoPrinterSel']))){
       $printer = $_POST['gotoPrinterSel'];
-      unset($this->gotoPrinter[$printer]);
+      foreach($printer as $pname){
+        unset($this->gotoPrinter[$pname]);
+      }
     }
 
     if((isset($_POST['gotoPrinterEdit']))&&(isset($_POST['gotoPrinterSel']))&&(!empty($_POST['gotoPrinterSel']))){
index 8adafd25d5a20ed48552a8b17f52611985fba0d2..4877177b6ef549d5889a1c0a96b470b24ee8ab8a 100644 (file)
     <table style="width:100%" summary="{t}Printer settings{/t}">
        <tr>
            <td>
-               <select style="width:100%;" name="gotoPrinterSel" multiple size=5 {$gotoPrinterACL} id="gotoPrinter">
+               <select style="width:100%;" name="gotoPrinterSel[]" multiple size=5 {$gotoPrinterACL} id="gotoPrinter">
                {html_options values=$gotoPrinterKeys output=$gotoPrinter}
                <option disabled>&nbsp;</option>
                </select>
index 197cf2f1dfe2830f861c308e0569d796ec62738d..d30845c97f869ac30182d7a067798b071b3fb827 100644 (file)
@@ -12,7 +12,7 @@
                                </div>
                                <div class="contentboxb">
                                <p class="contentboxb" style="border-top:1px solid #B0B0B0;background-color:#F8F8F8">
-                               <select style="width:600px;height:450px" size=20 name="gotoPrinter" id="gotoPrinter">
+                               <select style="width:600px;height:450px" size=20 name="gotoPrinter[]" id="gotoPrinter" multiple>
                                {html_options values=$gotoPrinterKeys output=$gotoPrinters}
                                <option disabled>&nbsp;</option>
                                         </select><br>