From 6f2177e00e2305ab0498714e0cde29e99224a036 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Bartosz=20Dziewo=C5=84ski?= Date: Thu, 23 Feb 2017 18:02:29 +0100 Subject: [PATCH] SearchFormWidget: Move hidden fields below the ActionFieldLayout I think ideally, these would be at the end of the form, but there are some hooks below which can produce arbitrary HTML and potentially want to override these with their own fields, so I'm avoiding any revolutionary changes to the field order here. Bug: T158856 Change-Id: I377c0061a365930e11454a86c1e0926853789b55 --- includes/widget/search/SearchFormWidget.php | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/includes/widget/search/SearchFormWidget.php b/includes/widget/search/SearchFormWidget.php index 1451843093..b8d415f695 100644 --- a/includes/widget/search/SearchFormWidget.php +++ b/includes/widget/search/SearchFormWidget.php @@ -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; } -- 2.20.1