CologneBlue: Use search input and button generators from SkinTemplate
authorDerk-Jan Hartman <hartman@videolan.org>
Sun, 21 Apr 2013 17:27:46 +0000 (19:27 +0200)
committerGerrit Code Review <gerrit@wikimedia.org>
Wed, 26 Jun 2013 20:48:31 +0000 (20:48 +0000)
This also makes sure that the search inputs receive their placeholder,
which fixes bug 47475.

Bug: 47475

Change-Id: Ie1215078edb38f98ec57d2a3ec46b1d0ace0bc30

skins/CologneBlue.php

index d766b64..5ae8843 100644 (file)
@@ -541,13 +541,12 @@ class CologneBlueTemplate extends BaseTemplate {
                        $s .= wfMessage( 'qbfind' )->text() . ": ";
                }
 
-               $s .= "<input type='text' class=\"mw-searchInput\" name=\"search\" size=\"14\" value=\""
-                       . htmlspecialchars( substr( $search, 0, 256 ) ) . "\" />"
-                       . ( $which == 'footer' ? " " : "<br />" )
-                       . "<input type='submit' class=\"searchButton\" name=\"go\" value=\"" . wfMessage( 'searcharticle' )->escaped() . "\" />";
+               $s .= $this->makeSearchInput( array( 'class' => 'mw-searchInput', 'type' => 'text', 'size' => '14' ) );
+               $s .= ( $which == 'footer' ? " " : "<br />" );
+               $s .= $this->makeSearchButton( 'go', array( 'class' => 'searchButton' ) );
 
                if ( $wgUseTwoButtonsSearchForm ) {
-                       $s .= " <input type='submit' class=\"searchButton\" name=\"fulltext\" value=\"" . wfMessage( 'searchbutton' )->escaped() . "\" />\n";
+                       $s .= $this->makeSearchButton( 'fulltext', array( 'class' => 'searchButton' ) );
                } else {
                        $s .= '<div><a href="' . $action . '" rel="search">' . wfMessage( 'powersearch-legend' )->escaped() . "</a></div>\n";
                }