* @return string HTML
*/
protected function shortDialogHtml( $profile, $term, $numResults, $totalResults, $offset ) {
+ $html = '';
+
$searchWidget = new SearchInputWidget( [
'id' => 'searchText',
'name' => 'search',
'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(
'div',
- [ 'class' => 'results-info' ],
+ [
+ 'class' => 'results-info',
+ 'data-mw-num-results-offset' => $offset,
+ 'data-mw-num-results-total' => $totalResults
+ ],
$this->specialSearch->msg( 'search-showingresults' )
->numParams( $offset + 1, $offset + $numResults, $totalResults )
->numParams( $numResults )
);
}
+ $html .=
+ Html::hidden( 'title', $this->specialSearch->getPageTitle()->getPrefixedText() ) .
+ Html::hidden( 'profile', $profile ) .
+ Html::hidden( 'fulltext', '1' );
+
return $html;
}
*/
protected function optionsHtml( $term, $isPowerSearch, $profile ) {
$html = '';
- $opts = [
- 'profile' => $profile,
- ];
if ( $isPowerSearch ) {
- $html .= $this->powerSearchBox( $term, $opts );
+ $html .= $this->powerSearchBox( $term, [] );
} else {
$form = '';
Hooks::run( 'SpecialSearchProfileForm', [
- $this->specialSearch, &$form, $profile, $term, $opts
+ $this->specialSearch, &$form, $profile, $term, []
] );
$html .= $form;
}
return
"<fieldset id='mw-searchoptions'>" .
"<legend>" . $this->specialSearch->msg( 'powersearch-legend' )->escaped() . '</legend>' .
- "<h4>" . $this->specialSearch->msg( 'powersearch-ns' )->escaped() . '</h4>' .
+ "<h4>" . $this->specialSearch->msg( 'powersearch-ns' )->parse() . '</h4>' .
// populated by js if available
"<div id='mw-search-togglebox'></div>" .
$divider .