Code

Added dhcp edit via link in lsits
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 11 Sep 2007 13:28:31 +0000 (13:28 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 11 Sep 2007 13:28:31 +0000 (13:28 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@7269 594d385d-05f5-0310-b6e9-bd551577e9d8

plugins/admin/systems/class_servDHCP.inc

index 8bbf7a5e2dbc6db7eef43869f7ae2af8d57d7a20..886511b09697cab3c2a9cd2f51a372abe4d85e2d 100644 (file)
@@ -278,6 +278,16 @@ class servdhcp extends plugin
 
     }
 
+    if(isset($_GET['act']) && $_GET['act']=="edit" && isset($_GET['id'])){
+      $dn = base64_decode($_GET['id']);
+      if (isset($this->dhcpObjectCache[$dn])){
+        $section= $this->objectType($dn);
+        $this->current_object= $dn;
+        $this->dialog= new $section($this->dhcpObjectCache[$dn]);
+      }
+    }
+    
+
     /* Do we need to flip is_account state? */
     if (isset($_POST['modify_state'])){
       $this->is_account= !$this->is_account;
@@ -335,7 +345,9 @@ class servdhcp extends plugin
        
     $tmp = new dhcpNewSectionDialog(NULL);
     foreach($this->dhcpSections as $section => $values ){
-       
+    
+      $values = "<a href='?plug=".$_GET['plug']."&act=edit&id=".base64_encode($section)."'>".$values."</a>";
+       
       if (count($tmp->sectionMap[$this->objectType($section)])){
         if ($this->objectType($section) == "dhcpService"){
           $DhcpList->AddEntry(array(