Merge "SpecialTrackingCategories: Read from the extension registry"
[lhc/web/wiklou.git] / includes / htmlform / HTMLCheckField.php
index 5f70362..e54f748 100644 (file)
@@ -20,28 +20,19 @@ class HTMLCheckField extends HTMLFormField {
                        $attr['class'] = $this->mClass;
                }
 
-               if ( $this->mParent->isVForm() ) {
-                       // Nest checkbox inside label.
-                       return Html::rawElement( 'label',
-                               array(
-                                       'class' => 'mw-ui-checkbox-label'
-                               ),
-                               Xml::check( $this->mName, $value, $attr ) . $this->mLabel );
-               } else {
-                       $chkLabel = Xml::check( $this->mName, $value, $attr )
-                       . ' '
-                       . Html::rawElement( 'label', array( 'for' => $this->mID ), $this->mLabel );
-
-                       if ( $wgUseMediaWikiUIEverywhere ) {
-                               $chkLabel = Html::rawElement(
-                                       'div',
-                                       array( 'class' => 'mw-ui-checkbox' ),
-                                       $chkLabel
-                               );
-                       }
+               $chkLabel = Xml::check( $this->mName, $value, $attr )
+               . ' '
+               . Html::rawElement( 'label', array( 'for' => $this->mID ), $this->mLabel );
 
-                       return $chkLabel;
+               if ( $wgUseMediaWikiUIEverywhere || $this->mParent instanceof VFormHTMLForm ) {
+                       $chkLabel = Html::rawElement(
+                               'div',
+                               array( 'class' => 'mw-ui-checkbox' ),
+                               $chkLabel
+                       );
                }
+
+               return $chkLabel;
        }
 
        /**