Code

Updated workService.
[gosa.git] / gosa-plugins / goto / admin / systems / goto / class_workstationService.inc
index bae371a8bec95247b4576fe09283895ca0dccebf..3897dfe71e05bdf46e3cdfe2545ac5203469eecd 100644 (file)
@@ -3,7 +3,7 @@
 class workservice extends plugin
 {
   var $gotoScannerEnable;
-  var $gotoLpdEnable;
+  var $gotoLpdEnable = array();
 
   /* Generic terminal attributes */
   var $gotoXMonitor= "";
@@ -37,10 +37,10 @@ class workservice extends plugin
 
 
   /* attribute list for save action */
-  var $attributes= array("gotoXMonitor",
+  var $attributes= array("gotoXMonitor","gotoLpdEnable",
       "gotoXDriver", "gotoXResolution", "gotoXColordepth",
       "gotoXHsync", "gotoXVsync",
-      "gotoScannerEnable","gotoLpdEnable", "gotoScannerClients",
+      "gotoScannerEnable", "gotoScannerClients",
       "gotoScannerBackend", "gotoXKbModel", "gotoXKbLayout", "gotoXKbVariant",
       "gotoXMouseType", "gotoXMouseport", "goFonHardware");
   var $objectclasses= array("GOhard");
@@ -63,6 +63,15 @@ class workservice extends plugin
         "1400x1050" =>  "1400x1050", 
         "1600x1200" =>  "1600x1200");
 
+    /* Load gotoLpdEnable 
+     */
+    $this->gotoLpdEnable = array();
+    if(isset($this->attrs['gotoLpdEnable']['count'])){
+      for($i = 0 ; $i < $this->attrs['gotoLpdEnable']['count']; $i ++){
+        $this->gotoLpdEnable[] = $this->attrs['gotoLpdEnable'][$i];
+      }
+    }
+
     if($this->config->get_cfg_value("resolutions") != ""){
       $file = $this->config->get_cfg_value("resolutions");
 
@@ -253,15 +262,20 @@ class workservice extends plugin
       }
     }
 
+
     /**********
       gotoLpdEnable 
      **********/
-
     if(isset($_POST['gotoLpdEnable_Close'])){
       $this->dialog = NULL;
     }
+    if(isset($_POST['gotoLpdEnable_Ok'])){
+      $this->dialog->save_object();
+      $this->gotoLpdEnable = $this->dialog->save();
+      $this->dialog = NULL;
+    }
 
-    if(isset($_POST['gotoLpdEnable'])){
+    if(isset($_POST['gotoLpdEnable_Edit'])){
       $this->dialog = new gotoLpdEnable($this->config,$this->gotoLpdEnable,$this);
     }