* @return string
*/
function getLabelHtml( $cellAttributes = array() ) {
- $id = $this->mParams['id'];
- $label = Html::rawElement( 'label', array( 'for' => $id ), $this->mLabel );
-
if ( !empty( $this->mParams['radio'] ) ) {
+ $id = "wpSourceType{$this->mParams['upload-type']}";
$attribs = array(
'name' => 'wpSourceType',
'type' => 'radio',
if ( !empty( $this->mParams['checked'] ) ) {
$attribs['checked'] = 'checked';
}
+ $label = Html::rawElement( 'label', array( 'for' => $id ), $this->mLabel );
$label .= Html::element( 'input', $attribs );
+ } else {
+ $id = $this->mParams['id'];
+ $label = Html::rawElement( 'label', array( 'for' => $id ), $this->mLabel );
}
-
return Html::rawElement( 'td', array( 'class' => 'mw-label' ) + $cellAttributes, $label );
}