Last modified: 2012-12-30 21:04:41 UTC
Special:Preferences: multiselect can take a long list of inputs (I use one with 55 inputs, very long single column list...) Instead of seperating them with br-tags a non-style list should be used. Besides being semantically correct(!) one would be able to create CSS coluuns of the long list.
HTMLform.php > class HTMLMultiSelectField extends HTMLFormField {...}
function formatOptions( $options, $value ) { $html = ''; $attribs = array(); if ( !empty( $this->mParams['disabled'] ) ) { $attribs['disabled'] = 'disabled'; } $html .= '<ul class="'.$this->mParams['name'].'">'; foreach( $options as $label => $info ) { if( is_array( $info ) ) { $html .= Html::rawElement( 'h1', array(), $label ) . "\n"; $html .= $this->formatOptions( $info, $value ); } else { $thisAttribs = array( 'id' => $this->mID . "-$info", 'value' => $info ); $checkbox = Xml::check( $this->mName . '[]', in_array( $info, $value ), $attribs + $thisAttribs ); $checkbox .= ' ' . Html::rawElement( 'label', array( 'for' => $this->mID . "-$info" ), $label ); $html .= '<li>' .$checkbox. '</li>'; } } $html .= '</ul>'; return $html; }