Merge "HTMLFormField: Don't abuse mClass for VForms"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Thu, 15 Jan 2015 00:08:01 +0000 (00:08 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Thu, 15 Jan 2015 00:08:01 +0000 (00:08 +0000)
includes/htmlform/HTMLFormField.php

index a751900..645b507 100644 (file)
@@ -13,6 +13,7 @@ abstract class HTMLFormField {
        protected $mLabel; # String label.  Set on construction
        protected $mID;
        protected $mClass = '';
+       protected $mVFormClass = '';
        protected $mHelpClass = false;
        protected $mDefault;
        protected $mOptions = false;
@@ -512,7 +513,7 @@ abstract class HTMLFormField {
                        array( 'class' => $outerDivClass ) + $cellAttributes,
                        $inputHtml . "\n$errors"
                );
-               $divCssClasses = array( "mw-htmlform-field-$fieldType", $this->mClass, $errorClass );
+               $divCssClasses = array( "mw-htmlform-field-$fieldType", $this->mClass, $this->mVFormClass, $errorClass );
 
                $wrapperAttributes = array(
                        'class' => $divCssClasses,
@@ -561,7 +562,7 @@ abstract class HTMLFormField {
         */
        public function getVForm( $value ) {
                // Ewwww
-               $this->mClass .= ' mw-ui-vform-field';
+               $this->mVFormClass = ' mw-ui-vform-field';
                return $this->getDiv( $value );
        }