* 'default' -- default value when the form is displayed
* 'id' -- HTML id attribute
* 'cssclass' -- CSS class
+ * 'csshelpclass' -- CSS class used to style help text
* 'options' -- associative array mapping labels to values.
* Some field types support multi-level arrays.
* 'options-messages' -- associative array mapping message keys to values.
protected $mLabel; # String label. Set on construction
protected $mID;
protected $mClass = '';
+ protected $mHelpClass = false;
protected $mDefault;
protected $mOptions = false;
protected $mOptionsLabelsNotFromMessage = false;
$this->mClass = $params['cssclass'];
}
+ if ( isset( $params['csshelpclass'] ) ) {
+ $this->mHelpClass = $params['csshelpclass'];
+ }
+
if ( isset( $params['validation-callback'] ) ) {
$this->mValidationCallback = $params['validation-callback'];
}
$rowAttributes['class'] = 'mw-htmlform-hide-if';
}
- $row = Html::rawElement( 'td', array( 'colspan' => 2, 'class' => 'htmlform-tip' ), $helptext );
+ $tdClasses = array( 'htmlform-tip' );
+ if ( $this->mHelpClass !== false ) {
+ $tdClasses[] = $this->mHelpClass;
+ }
+ $row = Html::rawElement( 'td', array( 'colspan' => 2, 'class' => $tdClasses ), $helptext );
$row = Html::rawElement( 'tr', $rowAttributes, $row );
return $row;