Code

Fixed dhcp subdialog buttons when configuring a dhcpHost from any systems generic...
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 10 Oct 2007 13:48:36 +0000 (13:48 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 10 Oct 2007 13:48:36 +0000 (13:48 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@7495 594d385d-05f5-0310-b6e9-bd551577e9d8

plugins/admin/systems/class_componentGeneric.inc
plugins/admin/systems/class_dhcpHost.inc
plugins/admin/systems/class_phoneGeneric.inc
plugins/admin/systems/class_printGeneric.inc
plugins/admin/systems/class_servGeneric.inc
plugins/admin/systems/class_systemManagement.inc
plugins/admin/systems/class_terminalGeneric.inc
plugins/admin/systems/class_winGeneric.inc
plugins/admin/systems/class_workstationGeneric.inc

index 5605253aa5b91b0dbcf2072c7aba3632332a303d..3bd61a220223075da09e684a1a288e4182e5656e 100644 (file)
@@ -108,7 +108,11 @@ class componentGeneric extends plugin
     $smarty->assign("base_select", $this->base);
 
     /* Show main page */
-    $smarty->assign("netconfig", $this->netConfigDNS->execute());
+    $str = $this->netConfigDNS->execute();
+    if(is_object($this->netConfigDNS->dialog)){
+      return($str);
+    }
+    $smarty->assign("netconfig", $str);
     return($smarty->fetch (get_template_path('component.tpl', TRUE)));
   }
 
index 55e1bee64f511252aef8c53fdb68bbcb59404e8c..610eadc6e69669ea94df2d17cd537eb53922aeac 100644 (file)
@@ -127,7 +127,10 @@ class dhcpHost extends dhcpPlugin
   {
     $message= array();
 
-    $cache = $this->parent->dhcpObjectCache;
+    $cache = array();
+    if(isset($this->parent)){
+      $cache = $this->parent->dhcpObjectCache;
+    }
   
     /* All required fields are set? */
     if ($this->cn == ""){
index 365aaf5af5360619b8abcc1f10c6390f27af0a56..a505fa931789b06289433571796226f5417db921 100644 (file)
@@ -252,7 +252,11 @@ class phoneGeneric extends plugin
     $smarty->assign("goFonDefaultIPs",array("dynamic"=>_("dynamic"),"network"=>_("Networksettings")));
  
     /* Show main page */
-    $smarty->assign("netconfig", $this->netConfigDNS->execute());
+    $str = $this->netConfigDNS->execute();
+    if(is_object($this->netConfigDNS->dialog)){
+      return($str);
+    }
+    $smarty->assign("netconfig", $str);
     $smarty->assign("phonesettings", dirname(__FILE__)."/phonesettings.tpl");
     return($smarty->fetch (get_template_path('phone.tpl', TRUE)));
   }
index c1b7ae244dec566e4930afc3e11c9403276111e0..18b1ba0251dc7fd8fc25280aa26086073cb0dfc8 100644 (file)
@@ -549,7 +549,13 @@ class printgeneric extends plugin
     $smarty->assign("AdminMembers"   ,$adminlist);
     $smarty->assign("AdminMemberKeys",array_flip($adminlist));
     if(preg_match("/Printer/i",$this->BelongsTo)){
-      $smarty->assign("netconfig", $this->netConfigDNS->execute());
+
+      /* Show main page */
+      $str = $this->netConfigDNS->execute();
+      if(is_object($this->netConfigDNS->dialog)){
+        return($str);
+      }
+      $smarty->assign("netconfig", $str);
     } else {
       $smarty->assign("netconfig", "");
     }
index 375169693551a08813c0e5d8a5514a085ea5146c..de16b1d526aed09bcf83e9a347c1e8e3b30b2100 100644 (file)
@@ -224,7 +224,12 @@ class servgeneric extends plugin
 
     /* Show main page */
     $smarty->assign("fai_activated",$this->fai_activated);
-    $smarty->assign("netconfig", $this->netConfigDNS->execute());
+
+    $str = $this->netConfigDNS->execute();
+    if(is_object($this->netConfigDNS->dialog)){
+      return($str);
+    }
+    $smarty->assign("netconfig", $str);
     $smarty->assign("modes", $this->modes);
 
     return($smarty->fetch (get_template_path('server.tpl', TRUE)));
index bd4fe814a5c25cb1cb5490e3c203ab0029d76797..aacc86281ec90e1581f858209bb64df3c1bd8be1 100644 (file)
@@ -821,6 +821,11 @@ class systems extends plugin
         }  
       }
 
+      if(isset($this->systab->by_object[$this->systab->current]->netConfigDNS) && 
+        $this->systab->by_object[$this->systab->current]->netConfigDNS->dialog){
+        $dialog = TRUE;
+      }
+
       if (!$dialog){
         $display.= "<p style=\"text-align:right\">\n";
         $display.= "<input type=\"submit\" name=\"edit_finish\" style=\"width:80px\" value=\""._("Ok")."\">\n";
index 64e37b81f668805b110c5242a2d74d99e3eb9d0f..b0c2e4c679f8f5e49ca0bb6826abd88c7fcc510e 100644 (file)
@@ -358,7 +358,11 @@ class termgeneric extends plugin
     $smarty->assign("member_of_ogroup",$this->member_of_ogroup);
 
     /* Show main page */
-    $smarty->assign("netconfig", $this->netConfigDNS->execute());
+    $str = $this->netConfigDNS->execute();
+    if(is_object($this->netConfigDNS->dialog)){
+      return($str);
+    }
+    $smarty->assign("netconfig", $str);
     return($smarty->fetch (get_template_path('terminal.tpl', TRUE)));
   }
 
index 173d6552089ad8516af42172b9837924f44066da..ef279f3ab20351aa809392b7a04f8e4c51a9bdad 100644 (file)
@@ -142,7 +142,11 @@ class wingeneric extends plugin
     $smarty->assign("base_select", $this->base);
 
     /* Show main page */
-    $smarty->assign("netconfig", $this->netConfigDNS->execute());
+    $str = $this->netConfigDNS->execute();
+    if(is_object($this->netConfigDNS->dialog)){
+      return($str);
+    }
+    $smarty->assign("netconfig", $str);
     return($smarty->fetch (get_template_path('wingeneric.tpl', TRUE)));
   }
 
index db73b29f69093fc5e7965f889a0c91f32a70838d..5b5a58a6c54cd1c54800664159b908cebb789cd3 100644 (file)
@@ -343,8 +343,13 @@ class workgeneric extends plugin
     $smarty->assign("inheritTimeServer",$this->inheritTimeServer);
     $smarty->assign("member_of_ogroup",$this->member_of_ogroup);
 
+    $str = $this->netConfigDNS->execute();
+    if(is_object($this->netConfigDNS->dialog)){
+      return($str);
+    }
+    $smarty->assign("netconfig", $str);
+
     /* Show main page */
-    $smarty->assign("netconfig", $this->netConfigDNS->execute());
     return($smarty->fetch (get_template_path('workstation.tpl', TRUE)));
   }