Code

Added pre coded tasks
authorcajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 20 Oct 2005 07:52:34 +0000 (07:52 +0000)
committercajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 20 Oct 2005 07:52:34 +0000 (07:52 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@1628 594d385d-05f5-0310-b6e9-bd551577e9d8

plugins/admin/fai/class_faiHookEntry.inc
plugins/admin/fai/faiHookEntry.tpl

index 70ed9f85606219ec467b0bab41550f46870b7dac..5e28e38982861eb5593c4f98837d45b37ac322dc 100644 (file)
@@ -13,7 +13,9 @@ class faiHookEntry extends plugin
   var $objectclasses= array();
 
   var $orig_cn              = "";
-
+  var $tasks                = array("chboot", "configure", "debconf", "extrbase", "faiend", "finish",
+                                    "install", "instsoft", "mirror", "mountdisks", "partition", "prepareapt",
+                                    "savelog", "softupdate", "sysinfo"," updatebase");
   var $Object_dn            = "";
   var $Object_cn            = "";
   var $Object_FAItask       = "";
@@ -55,6 +57,7 @@ class faiHookEntry extends plugin
         $this->Object_FAIscript = $str;
       }
     }
+    $smarty->assign("tasks", $this->tasks);
 
      /* Magic quotes GPC, escapes every ' " \, to solve some security risks
      * If we post the escaped strings they will be escaped again
@@ -89,9 +92,6 @@ class faiHookEntry extends plugin
   function check()
   {
     $message= array();
-    if(empty($this->Object_FAItask)) {
-      $message[]=_("Please enter a value for task.");
-    }
     if(empty($this->Object_FAIscript)) {
       $message[]=_("Please enter a value for script.");
     }
index 78fe9d3694c23716b68ab0e8e9f40174e6682030..1af7c5a638c1fed88294529449bacbda3cebac42 100644 (file)
                                        <tr>
                                                <td>
                                                        <LABEL for="Object_FAItask">
-                                                       {t}Task{/t}{$must}&nbsp;
+                                                       {t}Task{/t}&nbsp;
                                                        </LABEL>
-                                               </td>
-                                               <td>
-                                                       <input type="text" name="Object_FAItask" value="{$Object_FAItask}" id="Object_FAItask" style="width:280px;">
+                                                       <select name="Object_FAItask" title="{t}Choose a FAI task to hook{/t}">
+                                                               {html_options values=$tasks output=$tasks selected=$Object_FAItask}
+                                                       </select>
                                                </td>
                                        </tr>
                                </table>