}
function wrapForm( $html ) {
- return Xml::tags(
+ return Html::rawElement(
'form',
array(
'action' => $this->getTitle()->getFullURL(),
global $wgUser;
$html = '';
- $html .= Xml::hidden( 'wpEditToken', $wgUser->editToken() ) . "\n";
- $html .= Xml::hidden( 'title', $this->getTitle() ) . "\n";
+ $html .= Html::hidden( 'wpEditToken', $wgUser->editToken() ) . "\n";
+ $html .= Html::hidden( 'title', $this->getTitle() ) . "\n";
return $html;
}
$html .= Xml::submitButton( $this->getSubmitText(), $attribs ) . "\n";
if( $this->mShowReset ) {
- $html .= Xml::element(
+ $html .= Html::element(
'input',
array(
'type' => 'reset',
$errorstr = $errors;
}
- $errorstr = Xml::tags( 'div', array( 'class' => 'error' ), $errorstr );
+ $errorstr = Html::rawElement( 'div', array( 'class' => 'error' ), $errorstr );
global $wgOut;
$wgOut->addHTML( $errorstr );
$msg = $error;
$error = array();
}
- $errorstr .= Xml::tags(
+ $errorstr .= Html::rawElement(
'li',
null,
wfMsgExt( $msg, array( 'parseinline' ), $error )
);
}
- $errorstr = Xml::tags( 'ul', null, $errorstr );
+ $errorstr = Html::rawElement( 'ul', array(), $errorstr );
return $errorstr;
}
if ( $errors === true || !$wgRequest->wasPosted() ) {
$errors = '';
} else {
- $errors = Xml::tags( 'span', array( 'class' => 'error' ), $errors );
+ $errors = Html::rawElement( 'span', array( 'class' => 'error' ), $errors );
}
$html = '';
- $html .= Xml::tags( 'td', array( 'class' => 'mw-label' ),
- Xml::tags( 'label', array( 'for' => $this->mID ), $this->getLabel() )
+ $html .= Html::rawElement( 'td', array( 'class' => 'mw-label' ),
+ Html::rawElement( 'label', array( 'for' => $this->mID ), $this->getLabel() )
);
- $html .= Xml::tags( 'td', array( 'class' => 'mw-input' ),
+ $html .= Html::rawElement( 'td', array( 'class' => 'mw-input' ),
$this->getInputHTML( $value ) ."\n$errors" );
$fieldType = get_class( $this );
- $html = Xml::tags( 'tr', array( 'class' => "mw-htmlform-field-$fieldType" ),
+ $html = Html::rawElement( 'tr', array( 'class' => "mw-htmlform-field-$fieldType" ),
$html ) . "\n";
$helptext = null;
}
if ( !is_null( $helptext ) ) {
- $row = Xml::tags( 'td', array( 'colspan' => 2, 'class' => 'htmlform-tip' ),
+ $row = Html::rawElement( 'td', array( 'colspan' => 2, 'class' => 'htmlform-tip' ),
$helptext );
- $row = Xml::tags( 'tr', null, $row );
+ $row = Html::rawElement( 'tr', array(), $row );
$html .= "$row\n";
}
}
return Xml::check( $this->mName, $value, $attr ) . ' ' .
- Xml::tags( 'label', array( 'for' => $this->mID ), $this->mLabel );
+ Html::rawElement( 'label', array( 'for' => $this->mID ), $this->mLabel );
}
function getLabel() {
$tbAttribs['maxlength'] = $this->mParams['maxlength'];
}
- $textbox = Xml::input( $this->mName . '-other',
+ $textbox = Html::input( $this->mName . '-other',
$this->getSize(),
- $valInSelect ? '' : $value,
+ $valInSelect ? 'text' : $value,
$tbAttribs );
return "$select<br/>\n$textbox";
foreach( $options as $label => $info ) {
if( is_array( $info ) ) {
- $html .= Xml::tags( 'h1', null, $label ) . "\n";
+ $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 .= ' ' . Xml::tags( 'label', array( 'for' => $this->mID . "-$info" ), $label );
+ $checkbox .= ' ' . Html::rawElement( 'label', array( 'for' => $this->mID . "-$info" ), $label );
$html .= $checkbox . '<br />';
}
foreach( $options as $label => $info ) {
if( is_array( $info ) ) {
- $html .= Xml::tags( 'h1', null, $label ) . "\n";
+ $html .= Html::rawElement( 'h1', array(), $label ) . "\n";
$html .= $this->formatOptions( $info, $value );
} else {
$id = Sanitizer::escapeId( $this->mID . "-$info" );
$html .= Xml::radio( $this->mName, $info, $info == $value,
$attribs + array( 'id' => $id ) );
$html .= ' ' .
- Xml::tags( 'label', array( 'for' => $id ), $label );
+ Html::rawElement( 'label', array( 'for' => $id ), $label );
$html .= "<br/>\n";
}