Merge "Add two hooks to allow for extensions to expose log_search values in the UI"
[lhc/web/wiklou.git] / includes / htmlform / HTMLCheckField.php
index a0dd370..5f70362 100644 (file)
@@ -5,6 +5,8 @@
  */
 class HTMLCheckField extends HTMLFormField {
        function getInputHTML( $value ) {
+               global $wgUseMediaWikiUIEverywhere;
+
                if ( !empty( $this->mParams['invert'] ) ) {
                        $value = !$value;
                }
@@ -26,9 +28,19 @@ class HTMLCheckField extends HTMLFormField {
                                ),
                                Xml::check( $this->mName, $value, $attr ) . $this->mLabel );
                } else {
-                       return Xml::check( $this->mName, $value, $attr )
+                       $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
+                               );
+                       }
+
+                       return $chkLabel;
                }
        }