Fix input regression affecting HTMLForms that use VForm
authorMatthew Flaschen <mflaschen@wikimedia.org>
Wed, 1 Oct 2014 06:15:02 +0000 (02:15 -0400)
committerMatthew Flaschen <mflaschen@wikimedia.org>
Wed, 1 Oct 2014 06:17:42 +0000 (02:17 -0400)
Although the classes (e.g. mw-ui-input) are still there,
the style module was not being loaded.

This affects forms that deliberately use VForm even without
wgUseMediaWikiUIEverywhere (since they pre-date it).

This applies at least to PasswordReset, which was added in
d32891d99f185e5cf2b0e25bf947de221d4c3295 (last October).

Bug: 71448
Change-Id: Ieca36c0036d4c93244c533237eddd678564dd3c0

includes/htmlform/HTMLForm.php

index 6589b2a..4511046 100644 (file)
@@ -788,9 +788,14 @@ class HTMLForm extends ContextSource {
                $this->getOutput()->preventClickjacking();
                $this->getOutput()->addModules( 'mediawiki.htmlform' );
                if ( $this->isVForm() ) {
+                       // This is required for VForm HTMLForms that use that style regardless
+                       // of wgUseMediaWikiUIEverywhere (since they pre-date it).
+                       // When wgUseMediaWikiUIEverywhere is removed, this should be consolidated
+                       // with the addModuleStyles in SpecialPage->setHeaders.
                        $this->getOutput()->addModuleStyles( array(
                                'mediawiki.ui',
                                'mediawiki.ui.button',
+                               'mediawiki.ui.input',
                        ) );
                        // @todo Should vertical form set setWrapperLegend( false )
                        // to hide ugly fieldsets?