Code

Made some fields selectable
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 29 Sep 2010 14:21:47 +0000 (14:21 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 29 Sep 2010 14:21:47 +0000 (14:21 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@19854 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-plugins/goto/admin/systems/goto/Device/InstallRecipe.tpl
gosa-plugins/goto/admin/systems/goto/Device/class_InstallRecipe.inc

index 868d27971f4a121d872ab5ae42862cbff5764ce1..d49065332de4f73145e55f71f48dc0f720dbd4f6 100644 (file)
@@ -9,19 +9,28 @@
                 <tr>
                     <td><LABEL for="kickstartMirrorDN">{t}Mirror{/t}</LABEL></td>
                     <td>
-                        <input type='text' name="kickstartMirrorDN" id="kickstartMirrorDN" value="{$kickstartMirrorDN}">
+                        <select name="kickstartMirrorDN" size=1>
+                            {html_options options=$kickstartMirrorDNList 
+                            selected=$kickstartMirrorDN}
+                        </select>
                     </td>
                 </tr>
                 <tr>
                     <td><LABEL for="kickstartTemplateDN">{t}Kickstart template{/t}</LABEL></td>
                     <td>
-                        <input type='text' name="kickstartTemplateDN" id="kickstartTemplateDN" value="{$kickstartTemplateDN}">
+                        <select name="kickstartTemplateDN" size=1>
+                            {html_options options=$kickstartTemplateDNList 
+                            selected=$kickstartTemplateDN}
+                        </select>
                     </td>
                 </tr>
                 <tr>
                     <td><LABEL for="kickstartKernelPackage">{t}Kernel package{/t}</LABEL></td>
                     <td>
-                        <input type='text' name="kickstartKernelPackage" id="kickstartKernelPackage" value="{$kickstartKernelPackage}">
+                        <select name="kickstartKernelPackage" size=1>
+                            {html_options values=$kickstartKernelPackageList output=$kickstartKernelPackageList 
+                            selected=$kickstartKernelPackage}
+                        </select>
                     </td>
                 </tr>
             </table>
                 <tr>
                     <td><LABEL for="kickstartKeyboardlayout">{t}Keyboard layout{/t}</LABEL></td>
                     <td>
-                        <input type='text' name="kickstartKeyboardlayout" id="kickstartKeyboardlayout" value="{$kickstartKeyboardlayout}">
+                        <select name="kickstartKeyboardlayout" size=1>
+                            {html_options values=$kickstartKeyboardlayoutList output=$kickstartKeyboardlayoutList 
+                            selected=$kickstartKeyboardlayout}
+                        </select>
                     </td>
                 </tr>
                 <tr>
                     <td><LABEL for="kickstartSystemLocale">{t}System locale{/t}</LABEL></td>
                     <td>
-                        <input type='text' name="kickstartSystemLocale" id="kickstartSystemLocale" value="{$kickstartSystemLocale}">
+                        <select name="kickstartSystemLocale" size=1>
+                            {html_options values=$kickstartSystemLocaleList output=$kickstartSystemLocaleList 
+                            selected=$kickstartSystemLocale}
+                        </select>
                     </td>
                 </tr>
             </table>
index 9d98c360116f65ff9c176bea75a3e88cbf4f77f9..ce618239be6411afd135d683f04b44954e075b07 100644 (file)
@@ -3,15 +3,25 @@
 class InstallRecipe extends plugin
 {
     public $kickstartTemplateDN = "";
+    public $kickstartTemplateDNList = array(
+        'dc=intranet,dc=gonicus,dc=de' => 'Intranet-Tpl',
+        'ou=systems,dc=intranet,dc=gonicus,dc=de' => 'System-Tpl');
+
+    public $kickstartMirrorDN = "";
+    public $kickstartMirrorDNList = array(
+        'dc=intranet,dc=gonicus,dc=de' => 'Intranet',
+        'ou=systems,dc=intranet,dc=gonicus,dc=de' => 'System');
+    public $kickstartKernelPackage = "";
+    public $kickstartKernelPackageList = array('kernel1','kk1');
     public $kickstartKeyboardlayout = "";
+    public $kickstartKeyboardlayoutList = array("104","105");
     public $kickstartSystemLocale = "";
+    public $kickstartSystemLocaleList = array('de','en_EN.UTF-8');
     public $kickstartTimezone = "";
     public $kickstartTimeUTC = "";
     public $kickstartNTPServer = array();
-    public $kickstartMirrorDN = "";
     public $kickstartRootEnabled = "";
     public $kickstartRootPasswordHash = "";
-    public $kickstartKernelPackage = "";
     public $kickstartPartitionTable = "";
 
     public $objectclasses = array('installRecipe');
@@ -78,7 +88,6 @@ class InstallRecipe extends plugin
 
     function execute()
     {
-        
 
         if($this->setKickstartRootPasswordHash){
             $this->dialog = TRUE;
@@ -94,6 +103,11 @@ class InstallRecipe extends plugin
         plugin::execute();    
         $smarty = get_smarty();
         $smarty->assign('timezones', $this->timezones);
+        $smarty->assign('kickstartKeyboardlayoutList', $this->kickstartKeyboardlayoutList);
+        $smarty->assign('kickstartKernelPackageList', $this->kickstartKernelPackageList);
+        $smarty->assign('kickstartTemplateDNList', $this->kickstartTemplateDNList);
+        $smarty->assign('kickstartMirrorDNList', $this->kickstartMirrorDNList);
+        $smarty->assign('kickstartSystemLocaleList', $this->kickstartSystemLocaleList);
         $smarty->assign('kickstartNTPServerList', $this->kickstartNTPServerList->render());
         foreach($this->attributes as $attr){
             $smarty->assign($attr, $this->$attr);