* Multi-select field
*/
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-multiselect-item' ), $checkbox );
}
}
wfMsg( 'blocklist-tempblocks' ) => 'tempblocks',
wfMsg( 'blocklist-addressblocks' ) => 'addressblocks',
),
- 'cssclass' => 'mw-htmlform-multiselect-flatlist',
+ 'flatlist' => true,
),
);
$form = new HTMLForm( $fields );