Code

Override for inherited new objects
authorcajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 28 Jul 2006 11:18:57 +0000 (11:18 +0000)
committercajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 28 Jul 2006 11:18:57 +0000 (11:18 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@4339 594d385d-05f5-0310-b6e9-bd551577e9d8

plugins/admin/systems/class_systemManagement.inc
plugins/admin/systems/class_workstationService.inc

index d68133582ae1af800ef843efb262d6a8612ee7ed..5cff78e0a4f81cb594288fa5ad7a265825caf2b6 100644 (file)
@@ -395,8 +395,19 @@ class systems extends plugin
       if (count($message) == 0){
 
         /* Save terminal data to ldap */
-        gosa_log ("System object'".$this->dn."' has been saved");
+        if(isset($_SESSION['SelectedSystemType']['ogroup'])){
+          foreach (array("workservice", "termservice") as $cls){
+            if (isset($this->systab->by_object[$cls])){
+              $this->systab->by_object[$cls]->gotoXMouseport= "";
+              $this->systab->by_object[$cls]->gotoXMouseType= "";
+              $this->systab->by_object[$cls]->gotoXResolution= "";
+              $this->systab->by_object[$cls]->gotoXColordepth= "";
+            }
+          }
+        }
+
         $this->systab->save();
+        gosa_log ("System object'".$this->dn."' has been saved");
 
         /* Incoming behavior; you can select a system type and an ogroup membership. 
          * If this object is an Incoming object, $_SESSION['SelectedSystemType'] isset.
index e7ec6c77d6cf67132200aae667c26462d69a1397..7ba6be5e186e0a50b2220c793c5cfc1c11af48d8 100644 (file)
@@ -223,6 +223,17 @@ class workservice extends plugin
       }
 
     }
+
+    /* Workaround to fill in inherited values if we've specified an objectclass */
+    if (isset($_SESSION['SelectedSystemType']['ogroup']) && $_SESSION['SelectedSystemType']['ogroup'] != 'none'){
+      $this->XResolutions= array('default' => _("inherited"));
+      $this->XColordepths= array('default' => _("inherited"));
+      $this->XKbModels= array('default' => _("inherited"));
+      $this->XKbLayouts= array('default' => _("inherited"));
+      $this->XKbVariants= array('default' => _("inherited"));
+      $this->MouseTypes= array('AUTO' => _("inherited"));
+      $this->MousePorts= array('AUTO' => _("inherited"));
+    }
   }
 
   function execute()