From 52c29a7a8735c0b7cc2562899e2f384e0b93dc8d Mon Sep 17 00:00:00 2001 From: =?utf8?q?Bartosz=20Dziewo=C5=84ski?= Date: Wed, 14 Jan 2015 15:00:39 -0800 Subject: [PATCH] HTMLFormField: Don't abuse mClass for VForms Various fields use this differently than I thought, breaking things. Let's add a separate variable. Change-Id: Ia974a42c2a905cbc9e8405d9f03c10c8ad692864 --- includes/htmlform/HTMLFormField.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/includes/htmlform/HTMLFormField.php b/includes/htmlform/HTMLFormField.php index a75190075b..645b507fa5 100644 --- a/includes/htmlform/HTMLFormField.php +++ b/includes/htmlform/HTMLFormField.php @@ -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 ); } -- 2.20.1