Code

Added <label> and id tag to new filter class
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 7 Oct 2009 06:23:28 +0000 (06:23 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 7 Oct 2009 06:23:28 +0000 (06:23 +0000)
- checkbox can now be used with <Label> tags.

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

gosa-core/include/class_filter.inc

index 3a9e38d75856c25e3fa1bb45c3019d840dfa3fc5..86b23cf0dce4c8bf6e2daba8ddb3f66caa91876a 100644 (file)
@@ -176,7 +176,7 @@ class filter {
       $checked= " checked";
     }
 
-    $result= "<input class='filter_checkbox' name='$tag' type='checkbox' onClick='document.mainform.submit();' value='true'$checked>";
+    $result= "<input class='filter_checkbox' id='$tag' name='$tag' type='checkbox' onClick='document.mainform.submit();' value='true'$checked>";
     return $result;
   }
 
@@ -306,7 +306,7 @@ class filter {
   function renderScope()
   {
     $checked= $this->scope == "sub"?" checked":"";
-    return "<input type='checkbox' name='SCOPE' value='1' onClick='document.mainform.submit();'$checked>&nbsp;"._("Search in subtrees");
+    return "<input type='checkbox' id='SCOPE' name='SCOPE' value='1' onClick='document.mainform.submit();'$checked>&nbsp;<LABEL for='SCOPE'>"._("Search in subtrees")."</LABEL>";
   }