Code

Removed must tag from Profile
[gosa.git] / plugins / admin / fai / class_faiManagement.inc
index 87046b49854f3ef2de0a974b5a586be3c71f6b28..9444ed8721373b3297be1efb2cb834440f96c899 100644 (file)
@@ -125,9 +125,7 @@ class faiManagement extends plugin
                                $s_action = "new_package";
                        }elseif(preg_match("/create_profile/i",$key)){
                                $s_action = "new_profile";
-                       }elseif(preg_match("/UseNewClass/",$key)){
-                               $s_action = "select_class_name_finished";
-                       }elseif(preg_match("/UseSelectedClass/",$key)){
+                       }elseif(preg_match("/edit_continue/",$key)){
                                $s_action = "select_class_name_finished";
                        }elseif(preg_match("/^entry_edit_.*/",$key)){
                                $s_entry = preg_replace("/^entry_edit_/","",$key);
@@ -141,6 +139,11 @@ class faiManagement extends plugin
 
                }
 
+               if(isset($_GET['edit_entry'])){
+                       $s_entry = $_GET['edit_entry'];
+                       $s_action = "edit";
+               }
+
                /* Confirm dialog 
                 * Delte object 
          */
@@ -162,7 +165,7 @@ class faiManagement extends plugin
 
                                /* Lock the current entry, so nobody will edit it during deletion */
                                add_lock ($this->dn, $this->ui->dn);
-                               $smarty->assign("warning", sprintf(_("You're about to delete all information about the component at '%s'."), $this->dn));
+                               $smarty->assign("warning", sprintf(_("You're about to delete all information about the FAI class at '%s'."), $this->dn));
                                return($smarty->fetch(get_template_path('remove.tpl', TRUE)));
                        } else {
 
@@ -172,6 +175,12 @@ class faiManagement extends plugin
                        }
                }
 
+               /* Delete canceled? */
+               if (isset($_POST['delete_cancel'])){
+                       del_lock ($this->dn);
+               }
+
+
                /* Deltetion was confirmed, so delete this entry
                 */
                if (isset($_POST['delete_terminal_confirm'])){
@@ -341,6 +350,7 @@ class faiManagement extends plugin
                                $display.= "</p>";
                        }elseif(!isset($this->dialog->current)){
                                $display.= "<p style=\"text-align:right\">\n";
+                               $display.= "<input type=submit name=\"edit_continue\" value=\""._("Continue")."\">&nbsp;";
                                $display.= "<input type=submit name=\"edit_cancel\" value=\""._("Cancel")."\">\n";
                                $display.= "</p>";
                        }
@@ -360,7 +370,7 @@ class faiManagement extends plugin
                        "<div style='background:#F0F0F9;padding:5px;'>&nbsp;".
 
                        " <input type='image' src='images/fai_new_profile.png' align='middle' 
-                       title='"._("New profile bundle")."' name='Create_profile' alt='"._("P")."'>&nbsp;".
+                       title='"._("New profile")."' name='Create_profile' alt='"._("P")."'>&nbsp;".
                        
                        "<img src=\"images/list_seperator.png\" alt=\"\" align=\"middle\" height=\"16\" width=\"1\">&nbsp;".
                                
@@ -368,16 +378,16 @@ class faiManagement extends plugin
                        title='"._("New partition table")."' name='Create_partition' alt='"._("PT")."'>&nbsp;".
 
                        " <input type='image' src='images/fai_new_script.png' align='middle' 
-                       title='"._("New script bundle")."' name='Create_script' alt='"._("S")."'>&nbsp;".
+                       title='"._("New scripts")."' name='Create_script' alt='"._("S")."'>&nbsp;".
 
                        " <input type='image' src='images/fai_new_hook.png' align='middle' 
-                       title='"._("New hook bundle")."' name='Create_hook' alt='"._("H")."'>&nbsp;".
+                       title='"._("New hooks")."' name='Create_hook' alt='"._("H")."'>&nbsp;".
 
                        " <input type='image' src='images/fai_new_variable.png' align='middle' 
-                       title='"._("New variable bundle")."' name='Create_variable' alt='"._("V")."'>&nbsp;".
+                       title='"._("New variables")."' name='Create_variable' alt='"._("V")."'>&nbsp;".
                        
                        " <input type='image' src='images/fai_new_template.png' align='middle' 
-                       title='"._("New template bundle")."' name='Create_template' alt='"._("T")."'>&nbsp;".
+                       title='"._("New templates")."' name='Create_template' alt='"._("T")."'>&nbsp;".
 
                        " <input type='image' src='images/fai_new_packages.png' align='middle' 
                        title='"._("New package list")."' name='Create_package' alt='"._("PK")."'>&nbsp;".
@@ -398,8 +408,10 @@ class faiManagement extends plugin
                                        array("string" => _("Actions"), "attach"=>"style='border:none;width:40px;'")));
 
 
-               $action  = "<input type='image' src='images/edit.png'   alt='"._("edit")."'   name='entry_edit_%KEY%' title='"._("Edit object")."'>";
-               $action .= "<input type='image' src='images/edittrash.png' alt='"._("delete")."' name='entry_delete_%KEY%' title='"._("Delete object")."'>";
+               $action  = "<input type='image' src='images/edit.png'   alt='"._("edit")."'   name='entry_edit_%KEY%' title='"._("Edit class")."'>";
+               $action .= "<input type='image' src='images/edittrash.png' alt='"._("delete")."' name='entry_delete_%KEY%' title='"._("Delete class")."'>";
+
+               $editlink ="<a href='?plug=".$_GET['plug']."&edit_entry=%KEY%'>%NAME%</a>";             
 
                /* Attach objects */
                foreach($this->objects as $key => $value){
@@ -471,7 +483,7 @@ class faiManagement extends plugin
                                        }
 
                                        $field1 = array("string" => $img , "attach" => "style='height:26px;width=20px;'");
-                                       $field2 = array("string" => $value['cn'].$desc , "attach" => "");
+                                       $field2 = array("string" => preg_replace(array("/%KEY%/","/%NAME%/"),array($key,$value['cn'].$desc),$editlink) , "attach" => "");
                                        $field3 = array("string" => $info, "attach" => "");
                                        $field4 = array("string" => preg_replace("/%KEY%/",$key,$action) , "attach"=>"style='text-align:right;border:none'");
                                        $divlist->AddEntry(array($field1,$field2,$field3,$field4));