Code

Switched gotoLdapServer from select box to divSelectBox ..
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 29 Mar 2006 06:35:26 +0000 (06:35 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 29 Mar 2006 06:35:26 +0000 (06:35 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@2921 594d385d-05f5-0310-b6e9-bd551577e9d8

plugins/admin/systems/class_workstationStartup.inc
plugins/admin/systems/workstationStartup.tpl

index e321ba0ec2b555a5c9c1473e33350d80244938a2..2c553a5d616b71b28ad84b15e4993baba4fbfed5 100644 (file)
@@ -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"=>"<input type='radio' name='gotoLdapServer' value='".$server."' ".$use.">",
+                  "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);
index 9622578c5a4c01e97e15658051fb68bb4efa53e9..210396509579cb8bb211a3f7b6c6cfccf7bcbd8c 100644 (file)
@@ -5,12 +5,8 @@
 
    <table summary="">
     <tr>
-     <td><LABEL for="gotoLdapServer">{t}LDAP server{/t}</LABEL></td>
-     <td>
-      <select name="gotoLdapServer" id="gotoLdapServer" title="{t}Choose LDAP server to use for accounts and terminal management{/t}" {$gotoLdapServerACL}>
-       {html_options values=$ldapservers output=$ldapservers selected=$gotoLdapServer_select}
-          <option disabled>&nbsp;</option>
-      </select>
+     <td colspan="2" style='vertical-align:top;padding-top:3px;'><LABEL for="gotoLdapServer">{t}LDAP server{/t}</LABEL><br>
+         {$SelectBoxLdapServer}        
      </td>
     </tr>
     <tr>