From: hickert Date: Fri, 9 Feb 2007 05:17:15 +0000 (+0000) Subject: Updated setup X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=1787282dffb285075c0659b73a5be73d0b1f0def;p=gosa.git Updated setup git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@5709 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/html/themes/default/style.css b/html/themes/default/style.css index d85d8054c..0724fa04f 100644 --- a/html/themes/default/style.css +++ b/html/themes/default/style.css @@ -1029,7 +1029,7 @@ div.step2_warning_text{ Setup step 4 styles */ -div.step4_name { +li.step4_name, div.step4_name { vertical-align: middle; float:left; overflow: hidden; @@ -1037,7 +1037,7 @@ div.step4_name { height:2.0em; } -div.step4_value { +li.step4_value, div.step4_value { float:left; width:200px; overflow: hidden; @@ -1045,16 +1045,18 @@ div.step4_value { height:2.0em; } -div.step4_status { +li.step4_status, div.step4_status { text-align:right; vertical-align: middle; overflow: hidden; height:2.0em; + text-decoration: none; } -div.step4_container { +ul.step4_container, div.step4_container { border: solid 1px #CCC; width:500px; height:2.0em; + float:left; } diff --git a/setup/class_setupStep4.inc b/setup/class_setupStep4.inc index 720686fe8..c923d7b12 100644 --- a/setup/class_setupStep4.inc +++ b/setup/class_setupStep4.inc @@ -30,7 +30,7 @@ class setup_step_4 extends setup_step var $peopleou = "ou=people,"; var $peopledn = "cn"; var $groupou = "ou=groups,"; - var $uidbase = 1000; + var $uidbase = 1000; var $encryption = "crypt"; var $mail = "kolab"; var $errors = TRUE; @@ -38,6 +38,8 @@ class setup_step_4 extends setup_step var $crypt_methods = array(); var $mail_methods = array(); + var $connect_id =FALSE; + var $attributes = array("connection","location","admin","password","base","peopleou","peopledn","groupou", "uidbase","encryption","mail","errors"); @@ -46,9 +48,8 @@ class setup_step_4 extends setup_step $this->s_title = _("Ldap settings"); $this->s_title_long = _("Ldap connection setup"); $this->s_info = _("This dialog allows the basic configuration of GOsa's behaviour and properties in your main configuration."); - $tmp = @passwordMethod::get_available_methods_if_not_loaded(); + $tmp = @passwordMethod::get_available_methods_if_not_loaded(); $this->crypt_methods = $tmp['name']; - $tmp = $this->get_available_mail_classes(); $this->mail_methods = $tmp['name']; } @@ -56,11 +57,13 @@ class setup_step_4 extends setup_step function execute() { $smarty = get_smarty(); - foreach($this->attributes as $attr){ $smarty->assign($attr,$this->$attr); } + $smarty->assign("connection_established",$this->is_connection_established()); + + $smarty->assign("peopledns",array("uid","cn")); $smarty->assign("crypt_methods",$this->crypt_methods); $smarty->assign("mail_methods",$this->mail_methods); @@ -92,6 +95,27 @@ class setup_step_4 extends setup_step } return($methods); } + + /* Check if specified server is reachable */ + function is_connection_established() + { + if(!$this->connect_id= @ldap_connect(validate($this->connection))){ + echo "false"; + return FALSE; + }else{ + echo "true"; + return TRUE; + } + } + + function save_object() + { + foreach($this->attributes as $attr){ + if(isset($_POST[$attr])){ + $this->$attr = $_POST[$attr]; + } + } + } } // vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler: diff --git a/setup/setup_step4.tpl b/setup/setup_step4.tpl index 1d4cfb88a..3faa404c6 100644 --- a/setup/setup_step4.tpl +++ b/setup/setup_step4.tpl @@ -7,10 +7,17 @@
- sad + {if !$connection_established} + {t}Connection failed{/t} + {/if} + +
+
+{if $connection_established} +
{t}Location description{/t} @@ -19,7 +26,6 @@
- asd
@@ -152,6 +158,7 @@ asd +{/if}