Code

Updated printer selection in evironment tab
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 27 Jan 2010 12:46:09 +0000 (12:46 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 27 Jan 2010 12:46:09 +0000 (12:46 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@15369 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-plugins/goto/personal/environment/class_environment.inc

index b7a3198164cdce9f8adc56d390c1c9cecd377d95..b87b3907126fd5e55967e32d5d26320158ce65bf 100644 (file)
@@ -878,12 +878,12 @@ class environment extends plugin
       $this->is_dialog=true;
     }
 
-    if(isset($_POST['selectPrinter_cancel']) && $this->dialog instanceOf printerSelect){
+    if(isset($_POST['printerSelect_cancel']) && $this->dialog instanceOf printerSelect){
       $this->is_dialog=false;
       $this->dialog=FALSE;
     }
 
-    if(isset($_POST['selectPrinter_save'])  && $this->dialog instanceOf printerSelect){
+    if(isset($_POST['printerSelect_save'])  && $this->dialog instanceOf printerSelect){
 
       $res = $this->dialog->save();
         foreach($res as $printer){
@@ -930,6 +930,15 @@ class environment extends plugin
         $this->dialog   =FALSE;
     }
 
+    // Display printer selection dialog 
+    if($this->dialog instanceOf printerSelect){
+
+      // Build up blocklist
+      session::set('filterBlacklist',array('cn' => array_keys($this->gotoPrinter)));
+      return($this->dialog->execute());
+    }
+
+
     if((isset($_POST['gotoPrinterDel']))&&(isset($_POST['gotoPrinterSel']))&&(!empty($_POST['gotoPrinterSel']))){
       $printer = $_POST['gotoPrinterSel'];
       foreach($printer as $pname){