Code

Select must have an option value, else they aren't W3c conform
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 25 May 2005 06:35:29 +0000 (06:35 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 25 May 2005 06:35:29 +0000 (06:35 +0000)
so i added an <option disabled></option> if the smarty array is empty (count() < 0)

git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@387 594d385d-05f5-0310-b6e9-bd551577e9d8

plugins/admin/users/class_userManagement.inc
plugins/admin/users/headpage.tpl

index b5f7b2c55d88fea75cc023a41bcbf8e3a72d0f3f..e417899896f98cf043bd98c0137ef1b9f5c9df8c 100644 (file)
@@ -527,6 +527,11 @@ class userManagement extends plugin
 
     /* Show main page */
     $smarty->assign("userlist", $this->userlist);
+    if(count($this->userlist)) {
+      $smarty->assign("SELECT_userlist",true);
+    } else {
+      $smarty->assign("SELECT_userlist",false);
+    }
     $smarty->assign("search_image", get_template_path('images/search.png'));
     $smarty->assign("tree_image", get_template_path('images/tree.png'));
     $smarty->assign("infoimage", get_template_path('images/info.png'));
index 629ea6ce214f63910a6321954119801954d36730..f195f2b39e7a4d5a8350e795d4fc3ed77cab5d1a 100644 (file)
@@ -9,7 +9,11 @@
   <div class="contentboxb">
     <p class="contentboxb">
       <select style="width:500px; height:450px;" name="userlist" size=15 ondblclick="this.form.edit_helper.value='1'; this.form.submit()">
-       {html_options options=$userlist}
+               {if $SELECT_userlist==true}     
+                       {html_options options=$userlist}
+               {else}
+                       <option disabled></option>
+               {/if}
       </select>
       <br>
       <input type=submit value="{t}New{/t}..." name="new_user">&nbsp;