From 97e61ff93f8965e4cd5ccfc625942812777687af Mon Sep 17 00:00:00 2001 From: hickert Date: Wed, 29 Mar 2006 06:45:47 +0000 Subject: [PATCH] Changed gotoLdapServer from html select to divSelectBox git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@2925 594d385d-05f5-0310-b6e9-bd551577e9d8 --- .../admin/systems/class_terminalStartup.inc | 39 +++++++++++++++++-- plugins/admin/systems/terminalStartup.tpl | 8 +--- 2 files changed, 37 insertions(+), 10 deletions(-) diff --git a/plugins/admin/systems/class_terminalStartup.inc b/plugins/admin/systems/class_terminalStartup.inc index 0f644245c..35b521d49 100644 --- a/plugins/admin/systems/class_terminalStartup.inc +++ b/plugins/admin/systems/class_terminalStartup.inc @@ -151,12 +151,43 @@ class termstartup extends plugin $smarty->assign("gotoShares",$this->printOutAssignedShares()); $smarty->assign("gotoShareKeys",array_flip($this->printOutAssignedShares())); + /* Arrays */ + $tmp = $this->config->data['SERVERS']['LDAP']; + /* Create divSelectBox for ldap server selection + */ + $SelectBoxLdapServer = new divSelectBox("LdapServer"); + $SelectBoxLdapServer->SetHeight(80); + + /* Set first entry as selected, if $this->gotoLdapServer is empty + * or given entry is no longer available ... + */ + $found = false; + foreach($tmp as $server){ + if($this->gotoLdapServer==$server){ + $found = true; + } + } + + /* Add Entries + */ + foreach($tmp as $server){ + $use =""; + if(($this->gotoLdapServer == $server) || ($found == false)) { + $found = true; + $use = " checked "; + }; + + $SelectBoxLdapServer->AddEntry( + array( + array("string"=>$server), + array("string"=>"", + "attach"=>"style='border-right:0px;'") + )); + } + + $smarty->assign("SelectBoxLdapServer",$SelectBoxLdapServer->DrawList()); - /* Arrays */ - $smarty->assign("ldapservers", $this->config->data['SERVERS']['LDAP']); - $smarty->assign("gotoLdapServer_select", $this->gotoLdapServer); - $smarty->assign("gotoLdapServerACL", chkacl($this->acl, "gotoLdapServer")); $smarty->assign("gotoShareACL", chkacl($this->acl, "gotoShareACL")); foreach (array("gotoModules" ) as $val){ $smarty->assign("$val", $this->$val); diff --git a/plugins/admin/systems/terminalStartup.tpl b/plugins/admin/systems/terminalStartup.tpl index b5c2af419..3360d9f81 100644 --- a/plugins/admin/systems/terminalStartup.tpl +++ b/plugins/admin/systems/terminalStartup.tpl @@ -5,12 +5,8 @@ - - -- 2.30.2
- + + {$SelectBoxLdapServer}