- $out .= Html::hidden( 'title', $t->getPrefixedText() );
- $out .= Xml::openElement( 'fieldset' );
- $out .= Xml::element( 'legend', null, $this->msg( 'allpages' )->text() );
- $out .= Xml::openElement( 'table', array( 'id' => 'nsselect', 'class' => 'allpages' ) );
- $out .= "<tr>
- <td class='mw-label'>" .
- Xml::label( $this->msg( 'allpagesfrom' )->text(), 'nsfrom' ) .
- " </td>
- <td class='mw-input'>" .
- Xml::input( 'from', 30, str_replace( '_', ' ', $from ), array( 'id' => 'nsfrom' ) ) .
- " </td>
-</tr>
-<tr>
- <td class='mw-label'>" .
- Xml::label( $this->msg( 'allpagesto' )->text(), 'nsto' ) .
- " </td>
- <td class='mw-input'>" .
- Xml::input( 'to', 30, str_replace( '_', ' ', $to ), array( 'id' => 'nsto' ) ) .
- " </td>
-</tr>
-<tr>
- <td class='mw-label'>" .
- Xml::label( $this->msg( 'namespace' )->text(), 'namespace' ) .
- " </td>
- <td class='mw-input'>" .
- Html::namespaceSelector(
- array( 'selected' => $namespace ),
- array( 'name' => 'namespace', 'id' => 'namespace' )
- ) . ' ' .
- Xml::checkLabel(
- $this->msg( 'allpages-hide-redirects' )->text(),
- 'hideredirects',
- 'hideredirects',
- $hideredirects
- ) . ' ' .
- Xml::submitButton( $this->msg( 'allpagessubmit' )->text() ) .
- " </td>
-</tr>";
- $out .= Xml::closeElement( 'table' );
- $out .= Xml::closeElement( 'fieldset' );
- $out .= Xml::closeElement( 'form' );
- $out .= Xml::closeElement( 'div' );
-
- return $out;
+ $form = HTMLForm::factory( 'table', $fields, $this->getContext() );
+ $form->setMethod( 'get' )
+ ->setWrapperLegendMsg( 'allpages' )
+ ->setSubmitTextMsg( 'allpagessubmit' )
+ ->prepareForm()
+ ->displayForm( false );