foreach ( $columns as $columnTag ) {
$thisTag = "$columnTag-$rowTag";
// Construct the checkbox
+ $thisId = "{$this->mID}-$thisTag";
$thisAttribs = array(
- 'id' => "{$this->mID}-$thisTag",
+ 'id' => $thisId,
'value' => $thisTag,
);
$checked = in_array( $thisTag, (array)$value, true );
$checked = true;
$thisAttribs['disabled'] = 1;
}
+ $chkBox = Xml::check( "{$this->mName}[]", $checked, $attribs + $thisAttribs );
+ if ( $this->mParent->getConfig()->get( 'UseMediaWikiUIEverywhere' ) ) {
+ $chkBox = Html::openElement( 'div', array( 'class' => 'mw-ui-checkbox' ) ) .
+ $chkBox .
+ Html::element( 'label', array( 'for' => $thisId ) ) .
+ Html::closeElement( 'div' );
+ }
$rowContents .= Html::rawElement(
'td',
array(),
- Xml::check( "{$this->mName}[]", $checked, $attribs + $thisAttribs )
+ $chkBox
);
}
$tableContents .= Html::rawElement( 'tr', array(), "\n$rowContents\n" );