Switch some HTMLForms in special pages to OOUI
[lhc/web/wiklou.git] / includes / htmlform / HTMLCheckField.php
index 90293f4..55312ff 100644 (file)
@@ -20,9 +20,15 @@ class HTMLCheckField extends HTMLFormField {
                        $attr['class'] = $this->mClass;
                }
 
-               $chkLabel = Xml::check( $this->mName, $value, $attr )
-               . ' '
-               . Html::rawElement( 'label', array( 'for' => $this->mID ), $this->mLabel );
+               $attrLabel = array( 'for' => $this->mID );
+               if ( isset( $attr['title'] ) ) {
+                       // propagate tooltip to label
+                       $attrLabel['title'] = $attr['title'];
+               }
+
+               $chkLabel = Xml::check( $this->mName, $value, $attr ) .
+                       ' ' .
+                       Html::rawElement( 'label', $attrLabel, $this->mLabel );
 
                if ( $wgUseMediaWikiUIEverywhere || $this->mParent instanceof VFormHTMLForm ) {
                        $chkLabel = Html::rawElement(