Code

Added new checkbox that allows to leave the lang attribute empty
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 5 Apr 2007 09:05:14 +0000 (09:05 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 5 Apr 2007 09:05:14 +0000 (09:05 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@5991 594d385d-05f5-0310-b6e9-bd551577e9d8

contrib/gosa.conf
setup/class_setupStep1.inc
setup/setup_step1.tpl

index e79bf76848ff7c5f210b6db9f8b585df2ffb679d..37b58a3791c9f008cc4ddd4a695bffd02384619b 100644 (file)
 {if $cv.optional.auto_network_hook_active}
                auto_network_hook="{$cv.optional.auto_network_hook} "
 {/if}
+{if $cv.force_global_lang}
                lang="{$cv.lang}"
+{else}
+               lang=""
+{/if}
                theme="{$cv.theme}"
                session_lifetime="{$cv.optional.session_lifetime}"
                compile="{$cv.optional.compile}"
index cffd352660d87696231afaf1fbdecba68e6dca1b..33ed3a2c68e0c2b20a7fafa69dccbc7fd92b2bd0 100644 (file)
@@ -24,7 +24,8 @@ class setup_step_1 extends setup_step
 {
   var $lang       = "en_EN";
   var $languages  = array();
-  var $attributes = array("lang");
+  var $attributes = array("lang","force_global_lang");
+  var $force_global_lang = FALSE;
 
   function setup_step_1()
   {
@@ -53,6 +54,7 @@ class setup_step_1 extends setup_step
     $smarty = get_smarty();
     $smarty->assign("languages", $this->languages);
     $smarty->assign("lang", $this->lang);
+    $smarty->assign("force_global_lang", $this->force_global_lang);
     return($smarty->fetch(get_template_path("setup_step1.tpl",TRUE,dirname(__FILE__))));
   }
 
@@ -62,6 +64,12 @@ class setup_step_1 extends setup_step
       $this->lang = $_POST['lang'];
       $this->is_completed = TRUE;
       $_SESSION['lang'] = $this->lang;
+    
+      if(isset($_POST['force_global_lang'])){
+        $this->force_global_lang = TRUE;
+      }else{
+        $this->force_global_lang = FALSE;
+      }
     }
   }
 }
index bafeb3d1f6ec9e8483afb39efa72878dc5af122a..030e2ee5a35f0cec53c0d45f5620d7e53f5736bc 100644 (file)
@@ -1,17 +1,34 @@
 <div>
        <div class='default'>
-               <b>{t}Please select the language that should be used in GOsa setup.{/t}</b>
+               <b>{t}Please select the language you prefer to use GOsa with.{/t}</b>
        </div>
        <br>
-       <div  class='default' style='float:left;width:120px;'>
-               {t}Language{/t}
+       <div  class='default' style='float:left;width:160px;'>
+               {t}Setup language{/t}
        </div>
-       <div class='default' style='float:left;'>
+       <div class='default' style=';'>
                <select name='lang' title='{t}Please your prefered language here{/t}' size=5 style='width:300px;'>
                {html_options options=$languages selected=$lang}
                </select>
        </div>
+       
+       <div  class='default' style='float:left;width:160px;'>
+               <br>
+               <br>
+               {t}GOsa language settings{/t}
+       </div>
        <div class='default' style='float:left;'>
-<!--           <input type='submit' name='next' value='{t}Next{/t}'>-->
+               <br>
+               <br>
+               {t}To force GOsa to use the selected language as global default language, use the option below.{/t}
+               <br> 
+               {t}If you want GOsa to automatically detect the language settings, leave this option clear.{/t} 
+               &nbsp; 
+               <br> 
+               {if $force_global_lang}
+               <input checked type='checkbox' name='force_global_lang'>&nbsp;{t}Force global language{/t} 
+               {else}
+               <input type='checkbox' name='force_global_lang'>&nbsp;{t}Force global language{/t} 
+               {/if}
        </div>
 </div>