Code

Fixed FAI opsi handling.
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 29 Aug 2008 13:33:20 +0000 (13:33 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 29 Aug 2008 13:33:20 +0000 (13:33 +0000)
-Use property config in tabbed mode

git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@12311 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-plugins/fai/admin/fai/class_faiManagement.inc

index 8345f9028571d5eecec46d39e18a61e1c73fdac9..417b1fd77c9add9f52189df7c70579b55f3fb9c7 100644 (file)
@@ -267,15 +267,18 @@ class faiManagement extends plugin
       if($s_action == "opsi_edit"){
         $name = $this->objects[$s_entry]['cn'];
         $cfg = $this->opsi->get_product_properties($name);
-        $this->dialog = new tabs_opsiProdConfig($this->config, $this->config->data['TABS']['OPSIPRODCONFIG'], $cfg);
+        $this->dialog = new tabs_opsiProdConfig($this->config, $this->config->data['TABS']['OPSIPRODCONFIG'],"","opsi");
+        $this->dialog->by_object['opsiProperties']->set_cfg($cfg);
+        $this->dialog->by_object['opsiProperties']->set_product($name);
       }
       if($this->dialog instanceof tabs_opsiProdConfig && isset($_POST['cancel_properties'])){
         $this->dialog = NULL;
       }
       if($this->dialog instanceof tabs_opsiProdConfig && isset($_POST['save_properties'])){
         $this->dialog->save_object();
-        $name  = $this->dialog->get_product();
-        $cfg   = $this->dialog->get_cfg();
+        $op    = $this->dialog->by_object['opsiProperties'];
+        $name  = $op->get_product();
+        $cfg   = $op->get_cfg();
         $this->opsi->set_product_properties($name,$cfg); 
         if($this->opsi->is_error()){
           msg_dialog::display(_("Error"),msgPool::siError($this->opsi->get_error()),ERROR_DIALOG);