Merge "SearchFormWidget: Move hidden fields below the ActionFieldLayout"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Thu, 23 Feb 2017 18:51:26 +0000 (18:51 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Thu, 23 Feb 2017 18:51:27 +0000 (18:51 +0000)
includes/widget/search/SearchFormWidget.php

index 1451843..b8d415f 100644 (file)
@@ -79,6 +79,8 @@ class SearchFormWidget {
         * @return string HTML
         */
        protected function shortDialogHtml( $profile, $term, $numResults, $totalResults, $offset ) {
+               $html = '';
+
                $searchWidget = new SearchInputWidget( [
                        'id' => 'searchText',
                        'name' => 'search',
@@ -96,11 +98,7 @@ class SearchFormWidget {
                        'align' => 'top',
                ] );
 
-               $html =
-                       Html::hidden( 'title', $this->specialSearch->getPageTitle()->getPrefixedText() ) .
-                       Html::hidden( 'profile', $profile ) .
-                       Html::hidden( 'fulltext', '1' ) .
-                       $layout;
+               $html .= $layout;
 
                if ( $totalResults > 0 && $offset < $totalResults ) {
                        $html .= Xml::tags(
@@ -113,6 +111,11 @@ class SearchFormWidget {
                        );
                }
 
+               $html .=
+                       Html::hidden( 'title', $this->specialSearch->getPageTitle()->getPrefixedText() ) .
+                       Html::hidden( 'profile', $profile ) .
+                       Html::hidden( 'fulltext', '1' );
+
                return $html;
        }