From ff18fe89013a66d082c0374919a55b32bb3b7393 Mon Sep 17 00:00:00 2001 From: hickert Date: Thu, 19 Apr 2007 06:07:23 +0000 Subject: [PATCH] Fixed w3c warnings in user select dialog (Ldap settings) Added option to hide forward/backward buttons and activated it for the user select dialog. git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@6103 594d385d-05f5-0310-b6e9-bd551577e9d8 --- setup/class_setup.inc | 31 +++++++++++++++++++------------ setup/class_setupStep.inc | 2 +- setup/class_setupStep_Ldap.inc | 9 ++++++--- 3 files changed, 26 insertions(+), 16 deletions(-) diff --git a/setup/class_setup.inc b/setup/class_setup.inc index c530b482e..0b45f4231 100644 --- a/setup/class_setup.inc +++ b/setup/class_setup.inc @@ -229,20 +229,27 @@ class setup function get_bottom_html() { - $str =""; - $str.="
"; - if(isset($this->o_steps[$this->i_current -1]) && $this->o_steps[$this->i_current -1]->is_enabled()){ - $str .= ""; + /* Skip adding forward/backward button, + * if the currently opened step is a sub dialog + */ + if($this->o_steps[$this->i_current]->dialog){ + $str =""; }else{ - $str .= ""; - } - $str.= " "; - if(isset($this->o_steps[$this->i_current + 1])){ - $str .= ""; - }else{ - $str .= ""; + $str =""; + $str.="
"; + if(isset($this->o_steps[$this->i_current -1]) && $this->o_steps[$this->i_current -1]->is_enabled()){ + $str .= ""; + }else{ + $str .= ""; + } + $str.= " "; + if(isset($this->o_steps[$this->i_current + 1])){ + $str .= ""; + }else{ + $str .= ""; + } + $str .="
"; } - $str .="
"; return($str); } diff --git a/setup/class_setupStep.inc b/setup/class_setupStep.inc index a5d86103e..b7438ea70 100644 --- a/setup/class_setupStep.inc +++ b/setup/class_setupStep.inc @@ -33,7 +33,7 @@ class setup_step extends plugin var $attributes = array(); var $parent = NULL; - + var $dialog = FALSE; function setup_step() { diff --git a/setup/class_setupStep_Ldap.inc b/setup/class_setupStep_Ldap.inc index 416d8cd33..dc0b9898c 100644 --- a/setup/class_setupStep_Ldap.inc +++ b/setup/class_setupStep_Ldap.inc @@ -118,7 +118,7 @@ class Step_Ldap extends setup_step $ldap->search("(&(objectClass=person)(|(uid=".$filter.")(cn=".$filter.")))"); $tmp = array(); while($attrs = $ldap->fetch()){ - $tmp[$attrs['dn']]= @LDAP::fix($attrs['dn']); + $tmp[base64_encode($attrs['dn'])]= @LDAP::fix($attrs['dn']); natcasesort($tmp); } return($tmp); @@ -139,7 +139,10 @@ class Step_Ldap extends setup_step if(isset($_POST['resolve_user'])){ $this->resolve_user = !$this->resolve_user; } - + + /* Hide backward forward button*/ + $this->dialog = $this->resolve_user; + if(isset($_POST['resolve_filter'])){ $this->resolve_filter = $_POST['resolve_filter']; } @@ -147,7 +150,7 @@ class Step_Ldap extends setup_step if(isset($_POST['use_selected_user'])){ if(isset($_POST['admin_to_use'])){ - $this->admin = $_POST['admin_to_use']; + $this->admin = base64_decode($_POST['admin_to_use']); $this->resolve_user = false; } } -- 2.30.2