From d84edb6a1adda649b6142e6ea2117cfb22421d48 Mon Sep 17 00:00:00 2001 From: hickert Date: Wed, 29 Mar 2006 06:35:26 +0000 Subject: [PATCH] Switched gotoLdapServer from select box to divSelectBox .. git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@2921 594d385d-05f5-0310-b6e9-bd551577e9d8 --- .../systems/class_workstationStartup.inc | 36 ++++++++++++++++++- plugins/admin/systems/workstationStartup.tpl | 8 ++--- 2 files changed, 37 insertions(+), 7 deletions(-) diff --git a/plugins/admin/systems/class_workstationStartup.inc b/plugins/admin/systems/class_workstationStartup.inc index e321ba0ec..2c553a5d6 100644 --- a/plugins/admin/systems/class_workstationStartup.inc +++ b/plugins/admin/systems/class_workstationStartup.inc @@ -483,6 +483,7 @@ class workstartup extends plugin /* Show main page */ $smarty= get_smarty(); + $smarty->assign("SelectBoxLdapServer",""); /* In this section server shares will be defined * A user can select one of the given shares and a mount point @@ -518,8 +519,41 @@ class workstartup extends plugin $smarty->assign("gotoShareKeys",array_flip($this->printOutAssignedShares())); /* Arrays */ - $smarty->assign("ldapservers", $this->config->data['SERVERS']['LDAP']); + + $tmp = $this->config->data['SERVERS']['LDAP']; + $smarty->assign("ldapserverKeys", $tmp); + +// foreach($tmp as $key => $server){ +// if(strlen($server)> 51){ +// $tmp[$key] = substr($server,0,48)."..."; +// } +// } + $smarty->assign("ldapservers", $tmp); $smarty->assign("gotoLdapServer_select", $this->gotoLdapServer); + + + $SelectBoxLdapServer = new divSelectBox("LdapServer"); + $SelectBoxLdapServer->SetHeight(80); + $tmp[] = "server2:o=testersrv,dc=de"; + $tmp[] = "server3:o=testersrv2,dc=de"; + $tmp[] = "server4:o=testersrv2,dc=de"; + foreach($tmp as $server){ + + $use =""; + if($this->gotoLdapServer == $server) { + $use = " checked "; + }; + + $SelectBoxLdapServer->AddEntry( + array( + array("string"=>$server), + array("string"=>"", + "attach"=>"style='border-right:0px;'") + )); + } + + $smarty->assign("SelectBoxLdapServer",$SelectBoxLdapServer->DrawList()); + $smarty->assign("gotoLdapServerACL", chkacl($this->acl, "gotoLdapServer")); foreach (array("gotoModules", "gotoAutoFs", "gotoFilesystem") as $val){ $smarty->assign("$val", $this->$val); diff --git a/plugins/admin/systems/workstationStartup.tpl b/plugins/admin/systems/workstationStartup.tpl index 9622578c5..210396509 100644 --- a/plugins/admin/systems/workstationStartup.tpl +++ b/plugins/admin/systems/workstationStartup.tpl @@ -5,12 +5,8 @@ - - -- 2.30.2
- +
+ {$SelectBoxLdapServer}