diff --git a/lib/front/front.class.php b/lib/front/front.class.php
index dd69db9d75..c0736d747b 100644
--- a/lib/front/front.class.php
+++ b/lib/front/front.class.php
@@ -219,6 +219,49 @@ class html
return $string;
}
+ /**
+ * Create tags like ""
+ *
+ * @param string $name the name of the button tag.
+ * @param string $value the value of the button tag.
+ * @param string $scope the scope of checkall.
+ * @param string $attrib other attribs.
+ * @return string
+ */
+ static public function checkAll($name, $value, $scope = "", $attrib = "")
+ {
+ $string = <<
+function checkAll(scope)
+{
+ if(scope)
+ {
+ $('#' + scope + ' input').each(function()
+ {
+ $(this).attr("checked", true)
+ });
+ }
+ $('input').each(function()
+ {
+ $(this).attr("checked", true)
+ });
+}
+
+EOT;
+ if($scope)
+ {
+ $string .= ""
*