- $namespaceselect = HTMLnamespaceselector($namespace, null);
-
- $frombox = "<input type='text' size='20' name='from' id='nsfrom' value=\""
- . htmlspecialchars ( $from ) . '"/>';
- $submitbutton = '<input type="submit" value="' . wfMsgHtml( 'allpagessubmit' ) . '" />';
-
- $out = "<div class='namespaceoptions'><form method='get' action='{$wgScript}'>";
- $out .= '<input type="hidden" name="title" value="'.$t->getPrefixedText().'" />';
- $out .= "
-<table id='nsselect' class='allpages'>
- <tr>
- <td align='right'>" . wfMsgHtml($this->nsfromMsg) . "</td>
- <td align='left'><label for='nsfrom'>$frombox</label></td>
- </tr>
- <tr>
- <td align='right'><label for='namespace'>" . wfMsgHtml('namespace') . "</label></td>
- <td align='left'>
- $namespaceselect $submitbutton
- </td>
- </tr>
-</table>
-";
- $out .= '</form></div>';
- return $out;
+ $out = Xml::openElement( 'div', array( 'class' => 'namespaceoptions' ) );
+ $out .= Xml::openElement( 'form', array( 'method' => 'get', 'action' => $wgScript ) );
+ $out .= Xml::hidden( 'title', $t->getPrefixedText() );
+ $out .= Xml::openElement( 'fieldset' );
+ $out .= Xml::element( 'legend', null, wfMsg( 'allpages' ) );
+ $out .= Xml::openElement( 'table', array( 'id' => 'nsselect', 'class' => 'allpages' ) );
+ $out .= "<tr>
+ <td class='mw-label'>" .
+ Xml::label( wfMsg( $this->nsfromMsg ), 'nsfrom' ) .
+ "</td>
+ <td class='mw-input'>" .
+ Xml::input( 'from', 20, $from, array( 'id' => 'nsfrom' ) ) .
+ "</td>
+ </tr>
+ <tr>
+ <td class='mw-label'>" .
+ Xml::label( wfMsg( 'namespace' ), 'namespace' ) .
+ "</td>
+ <td class='mw-input'>" .
+ Xml::namespaceSelector( $namespace, null ) . ' ' .
+ Xml::submitButton( wfMsg( 'allpagessubmit' ) ) .
+ "</td>
+ </tr>";
+ $out .= Xml::closeElement( 'table' );
+ $out .= Xml::closeElement( 'fieldset' );
+ $out .= Xml::closeElement( 'form' );
+ $out .= Xml::closeElement( 'div' );
+ return $out;