Code

Fixed dhcp saving for renamed objects
[gosa.git] / plugins / admin / fai / class_faiTemplate.inc
index 62dab484c23cbaceeb9c0a59f0f6925559a1acbe..bb552443cfa8a9690ec4711ccc25f151abc6d5e8 100644 (file)
@@ -160,6 +160,21 @@ class faiTemplate extends plugin
       }
     }
 
+    /* Edit entries via GET */
+    if(isset($_GET['act']) && isset($_GET['id'])){
+      if($_GET['act'] == "edit" && isset($this->SubObjects[$_GET['id']])){
+        $obj = $this->SubObjects[$_GET['id']];
+          if($obj['status'] == "FreshLoaded"){
+          $obj  = $this->get_object_attributes($obj,$this->sub_Load_Later);
+        }
+        $this->dialog= new $this->subClassName($this->config,$this->dn,$obj);
+        $this->dialog->acl = $this->acl;
+        $_SESSION['objectinfo'] = $obj['dn'];
+        $this->dialog->parent = &$this;
+        $this->is_dialog=true;
+      }
+    }
+
     /* Add new sub object */
     if(isset($_POST['AddSubObject'])){
       $this->dialog= new $this->subClassName($this->config,"new");
@@ -258,7 +273,9 @@ class faiTemplate extends plugin
           </a>";
       }
 
-      $divlist->AddEntry(array( array("string"=>$name),
+      $edit_link = "<a href='?plug=".$_GET['plug']."&act=edit&id=".$key."'>".$name."</a>";
+
+      $divlist->AddEntry(array( array("string"=> $edit_link),
             array("string"=>$down , "attach" => "style='width:20px;'"),
             array("string"=>str_replace("%s",base64_encode($key),$img_edit.$img_remo),
               "attach"=>"style='border-right: 0px;width:50px;text-align:right;'")));