* Add a nice fieldset around the input form
authorRaimond Spekking <raymond@users.mediawiki.org>
Tue, 18 Mar 2008 15:31:55 +0000 (15:31 +0000)
committerRaimond Spekking <raymond@users.mediawiki.org>
Tue, 18 Mar 2008 15:31:55 +0000 (15:31 +0000)
* Use proper XML function

includes/SpecialFilepath.php

index 4ba8fdb..84412ab 100644 (file)
@@ -33,37 +33,14 @@ class FilepathForm {
                global $wgOut, $wgTitle, $wgScript;
 
                $wgOut->addHTML(
-                       wfElement( 'form',
-                               array(
-                                       'id' => 'specialfilepath',
-                                       'method' => 'get',
-                                       'action' => $wgScript,
-                               ),
-                               null
-                       ) .
-                               wfHidden( 'title', $wgTitle->getPrefixedText() ) .
-                               wfOpenElement( 'label' ) .
-                                       wfMsgHtml( 'filepath-page' ) .
-                                       ' ' .
-                                       wfElement( 'input',
-                                               array(
-                                                       'type' => 'text',
-                                                       'size' => 25,
-                                                       'name' => 'file',
-                                                       'value' => is_object( $this->mTitle ) ? $this->mTitle->getText() : ''
-                                               ),
-                                               ''
-                                       ) .
-                                       ' ' .
-                                       wfElement( 'input',
-                                               array(
-                                                       'type' => 'submit',
-                                                       'value' => wfMsgHtml( 'filepath-submit' )
-                                               ),
-                                               ''
-                                       ) .
-                               wfCloseElement( 'label' ) .
-                       wfCloseElement( 'form' )
+                       Xml::openElement( 'form', array( 'method' => 'get', 'action' => $wgScript, 'id' => 'specialfilepath' ) ) .
+                       Xml::openElement( 'fieldset' ) .
+                       Xml::element( 'legend', null, wfMsg( 'filepath' ) ) .
+                       Xml::hidden( 'title', $wgTitle->getPrefixedText() ) .
+                       Xml::inputLabel( wfMsg( 'filepath-page' ), 'file', 'file', 25, is_object( $this->mTitle ) ? $this->mTitle->getText() : '' ) . ' ' .
+                       Xml::submitButton( wfMsg( 'filepath-submit' ) ) . "\n" .
+                       Xml::closeElement( 'fieldset' ) .
+                       Xml::closeElement( 'form' )
                );
        }
 }