From: Bartosz DziewoƄski Date: Thu, 23 Feb 2017 17:02:29 +0000 (+0100) Subject: SearchFormWidget: Move hidden fields below the ActionFieldLayout X-Git-Tag: 1.31.0-rc.0~4005^2 X-Git-Url: https://git.cyclocoop.org/%7B%24admin_url%7Dcompta/operations/supprimer.php?a=commitdiff_plain;h=6f2177e00e2305ab0498714e0cde29e99224a036;p=lhc%2Fweb%2Fwiklou.git 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 --- 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; }