Special:BookSources: Use appropriate mediawiki.ui classes and update strings
[lhc/web/wiklou.git] / includes / specials / SpecialBooksources.php
index 581619f..8b4462a 100644 (file)
@@ -117,15 +117,13 @@ class SpecialBookSources extends SpecialPage {
         * @return string
         */
        private function makeForm() {
-               global $wgScript;
-
                $form = Html::openElement( 'fieldset' ) . "\n";
                $form .= Html::element(
                        'legend',
                        array(),
                        $this->msg( 'booksources-search-legend' )->text()
                ) . "\n";
-               $form .= Html::openElement( 'form', array( 'method' => 'get', 'action' => $wgScript ) ) . "\n";
+               $form .= Html::openElement( 'form', array( 'method' => 'get', 'action' => wfScript() ) ) . "\n";
                $form .= Html::hidden( 'title', $this->getPageTitle()->getPrefixedText() ) . "\n";
                $form .= '<p>' . Xml::inputLabel(
                        $this->msg( 'booksources-isbn' )->text(),
@@ -133,9 +131,20 @@ class SpecialBookSources extends SpecialPage {
                        'isbn',
                        20,
                        $this->isbn,
-                       array( 'autofocus' => true )
+                       array( 'autofocus' => true, 'class' => 'mw-ui-input-inline' )
                );
-               $form .= '&#160;' . Xml::submitButton( $this->msg( 'booksources-go' )->text() ) . "</p>\n";
+
+               if ( $wgUseMediaWikiUIEverywhere ) {
+                       $form .= '&#160;' . Xml::submitButton(
+                               $this->msg( 'booksources-search' )->text(),
+                               array( 'class' => 'mw-ui-button mw-ui-progressive' )
+                       ) . "</p>\n";
+               } else {
+                       $form .= '&#160;' . Xml::submitButton(
+                               $this->msg( 'booksources-search' )->text()
+                       ) . "</p>\n";
+               }
+
                $form .= Html::closeElement( 'form' ) . "\n";
                $form .= Html::closeElement( 'fieldset' ) . "\n";