From 6e4835c17e05ba3c8ce607936ab8c48b44d33680 Mon Sep 17 00:00:00 2001 From: hickert Date: Mon, 16 Jul 2007 09:30:12 +0000 Subject: [PATCH] Moved timezone settings to config step 2 git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@6872 594d385d-05f5-0310-b6e9-bd551577e9d8 --- setup/class_setupStep_Config2.inc | 12 +++++++++++- setup/class_setupStep_Language.inc | 11 +---------- setup/setup_config2.tpl | 17 +++++++++++++++++ setup/setup_language.tpl | 16 ---------------- 4 files changed, 29 insertions(+), 27 deletions(-) diff --git a/setup/class_setupStep_Config2.inc b/setup/class_setupStep_Config2.inc index e42e5e032..872d8ccfa 100644 --- a/setup/class_setupStep_Config2.inc +++ b/setup/class_setupStep_Config2.inc @@ -51,7 +51,10 @@ class Step_Config2 extends setup_step var $use_netatalk = FALSE; var $enableFAI_management = FALSE; - var $attributes = array("governmentmode","sambaidmapping","cyrusunixstyle","mail","use_netatalk","enableFAI_management"); + var $timezone = "Europe/Berlin"; + var $timezones = array(); + + var $attributes = array("governmentmode","sambaidmapping","cyrusunixstyle","mail","use_netatalk","enableFAI_management","timezone"); var $called = FALSE; function Step_Config2() @@ -71,6 +74,7 @@ class Step_Config2 extends setup_step $pwdhash= 'perl -MCrypt::SmbHash -e "print join(q[:], ntlmgen \$ARGV[0]), $/;"'; } + $this->timezones = get_timezones_array(); $this->samba_settings['smbhash'] = $pwdhash; } @@ -142,6 +146,8 @@ class Step_Config2 extends setup_step foreach($this->attributes as $attr){ $smarty->assign($attr,$this->$attr); } + $smarty->assign("timezone" ,$this->timezone); + $smarty->assign("timezones" ,$this->timezones); return($smarty -> fetch (get_template_path("../setup/setup_config2.tpl"))); } @@ -149,6 +155,10 @@ class Step_Config2 extends setup_step { if(isset($_POST['step6_posted'])){ + if(isset($_POST['timezone']) && isset($this->timezones[$_POST['timezone']])){ + $this->timezone = $_POST['timezone']; + } + /* Get attributes */ foreach($this->attributes as $attr){ if(isset($_POST[$attr])){ diff --git a/setup/class_setupStep_Language.inc b/setup/class_setupStep_Language.inc index 6bbc22c37..986c33542 100644 --- a/setup/class_setupStep_Language.inc +++ b/setup/class_setupStep_Language.inc @@ -25,17 +25,14 @@ class Step_Language extends setup_step var $lang_selected = ""; /* Language selected from select box */ var $lang = "en_EN"; /* Detected language */ var $languages = array(); - var $attributes = array("lang","lang_selected","timezone"); + var $attributes = array("lang","lang_selected"); var $header_image = "images/locale.png"; - var $timezone = "Europe/Berlin"; - var $timezones = array(); function Step_Language() { $this->lang = get_browser_language(); $this->lang_selected = ""; $this->update_strings(); - $this->timezones = get_timezones_array(); } function update_strings() @@ -58,8 +55,6 @@ class Step_Language extends setup_step $smarty->assign("languages", $this->languages); $smarty->assign("lang", $this->lang); $smarty->assign("lang_selected",$this->lang_selected); - $smarty->assign("timezone" ,$this->timezone); - $smarty->assign("timezones" ,$this->timezones); return($smarty->fetch(get_template_path("setup_language.tpl",TRUE,dirname(__FILE__)))); } @@ -74,10 +69,6 @@ class Step_Language extends setup_step }else{ $_SESSION['lang'] = $this->lang; } - - if(isset($_POST['timezone']) && isset($this->timezones[$_POST['timezone']])){ - $this->timezone = $_POST['timezone']; - } } } } diff --git a/setup/setup_config2.tpl b/setup/setup_config2.tpl index 5189d7c50..bce647ec1 100644 --- a/setup/setup_config2.tpl +++ b/setup/setup_config2.tpl @@ -66,6 +66,23 @@ +
+
+ {t}Timezone{/t} +
+
+ +
+
+

{t}Additional GOsa settings{/t}

diff --git a/setup/setup_language.tpl b/setup/setup_language.tpl index c0bd4b582..6d1b30b98 100644 --- a/setup/setup_language.tpl +++ b/setup/setup_language.tpl @@ -10,20 +10,4 @@ {html_options options=$languages selected=$lang_selected} -
-
- {t}Timezone{/t} -
-
- -
-
-- 2.30.2