if ( isset( $params['filter-callback'] ) ) {
$this->mFilterCallback = $params['filter-callback'];
}
+
+ if ( isset( $params['flatlist'] ) ){
+ $this->mClass .= ' mw-htmlform-flatlist';
+ }
}
/**
*/
class HTMLMultiSelectField extends HTMLFormField {
- public function __construct( $params ){
- parent::__construct( $params );
- if( isset( $params['flatlist'] ) ){
- $this->mClass .= ' mw-htmlform-multiselect-flatlist';
- }
- }
-
function validate( $value, $alldata ) {
$p = parent::validate( $value, $alldata );
$attribs + $thisAttribs );
$checkbox .= ' ' . Html::rawElement( 'label', array( 'for' => "{$this->mID}-$info" ), $label );
- $html .= ' ' . Html::rawElement( 'div', array( 'class' => 'mw-htmlform-multiselect-item' ), $checkbox );
+ $html .= ' ' . Html::rawElement( 'div', array( 'class' => 'mw-htmlform-flatlist-item' ), $checkbox );
}
}
* Radio checkbox fields.
*/
class HTMLRadioField extends HTMLFormField {
- function __construct( $params ) {
- parent::__construct( $params );
- if ( isset( $params['flatlist'] ) ) {
- $this->mClass .= ' mw-htmlform-radio-flatlist';
- }
- }
function validate( $value, $alldata ) {
$radio .= ' ' .
Html::rawElement( 'label', array( 'for' => $id ), $label );
- $html .= ' ' . Html::rawElement( 'div', array( 'class' => 'mw-htmlform-radio-item' ), $radio );
+ $html .= ' ' . Html::rawElement( 'div', array( 'class' => 'mw-htmlform-flatlist-item' ), $radio );
}
}