https://bugzilla.wikimedia.org/show_bug.cgi?id=35970

--- Comment #2 from Subfader <subfa...@gmail.com> 2012-04-14 12:37:01 UTC ---
    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 .= '&nbsp;' . Html::rawElement( 'label', array( 'for'
=> $this->mID . "-$info" ), $label );

                $html .= '<li>' .$checkbox. '</li>';
            }
        }

        $html .= '</ul>';

        return $html;
    }

-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
You are on the CC list for the bug.

_______________________________________________
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to