From: hickert Date: Tue, 17 Jul 2007 06:35:33 +0000 (+0000) Subject: Updated setup. X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=0a0760287215ae653c8dc0345109a7d19e8396a1;p=gosa.git Updated setup. Added "Accept license" checkbox. Added selectbox to choose timezone for samba settings. git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@6885 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/html/setup.php b/html/setup.php index 06164aa00..8e9220e6b 100644 --- a/html/setup.php +++ b/html/setup.php @@ -24,6 +24,7 @@ /* Get standard functions */ require_once ("../include/php_setup.inc"); require_once ("functions.inc"); +require_once ("class_timezones.inc"); require_once("../setup/class_setup.inc"); require_once("../setup/class_setupStep.inc"); diff --git a/setup/class_setupStep_Config2.inc b/setup/class_setupStep_Config2.inc index 27efe10ce..18cebe586 100644 --- a/setup/class_setupStep_Config2.inc +++ b/setup/class_setupStep_Config2.inc @@ -46,7 +46,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() @@ -66,6 +69,7 @@ class Step_Config2 extends setup_step $pwdhash= 'perl -MCrypt::SmbHash -e "print join(q[:], ntlmgen \$ARGV[0]), $/;"'; } + $this->timezones = _get_tz_zones(); $this->samba_settings['smbhash'] = $pwdhash; } @@ -126,6 +130,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"))); } @@ -133,6 +139,10 @@ class Step_Config2 extends setup_step { if(isset($_POST['step6_posted'])){ + if(isset($_POST['timezone']) && isset($this->timezones['TIMEZONES'][$_POST['timezone']])){ + $this->timezone = $_POST['timezone']; + } + /* Get attributes */ foreach($this->attributes as $attr){ if(isset($_POST[$attr])){ diff --git a/setup/class_setupStep_License.inc b/setup/class_setupStep_License.inc index 0ed29d92a..d46768ca6 100644 --- a/setup/class_setupStep_License.inc +++ b/setup/class_setupStep_License.inc @@ -25,6 +25,9 @@ class Step_License extends setup_step var $license_found = false; var $License = ""; var $header_image = "images/ldif.png"; + var $accepted = FALSE; + var $attributes = array("accepted"); + function Step_License() { @@ -63,6 +66,7 @@ class Step_License extends setup_step $smarty = get_smarty(); $smarty -> assign("License",nl2br($this->License)); $smarty -> assign("license_found",$this->license_found); + $smarty -> assign("accepted",$this->accepted); return($smarty -> fetch (get_template_path("../setup/setup_license.tpl"))); } @@ -70,7 +74,15 @@ class Step_License extends setup_step function save_object() { - if($this->license_found){ + if(isset($_POST['step_license'])){ + if(isset($_POST['accepted'])){ + $this->accepted = TRUE; + }else{ + $this->accepted = FALSE; + } + } + + if($this->license_found && $this->accepted){ $this->is_completed = true; }else{ $this->is_completed = false; diff --git a/setup/setup_config2.tpl b/setup/setup_config2.tpl index d85d5126a..fdbaff13c 100644 --- a/setup/setup_config2.tpl +++ b/setup/setup_config2.tpl @@ -66,6 +66,31 @@ +
+
+ {t}Timezone{/t} +
+
+ +
+
+

{t}Additional GOsa settings{/t}

diff --git a/setup/setup_license.tpl b/setup/setup_license.tpl index c0c189636..5388c6af2 100644 --- a/setup/setup_license.tpl +++ b/setup/setup_license.tpl @@ -3,5 +3,9 @@
{$License}
+ +
+ {t}I have read the license and accept it{/t}
+