Skip to content
Snippets Groups Projects
Commit a8f20420 authored by Dries Buytaert's avatar Dries Buytaert
Browse files

- Patch #87049 by edkwh, chx and hunmonk: fixed the form in the search block.

parent 5eab30f6
No related branches found
Tags 11-69241
2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
......@@ -1045,7 +1045,7 @@ function search_form_submit($form_id, $form_values) {
/**
* Output a search form for the search block and the theme's search box.
*/
function search_box() {
function search_box($form_id) {
// Use search_keys instead of keys to avoid ID conflicts with the search block.
$form[$form_id .'_keys'] = array(
'#type' => 'textfield',
......@@ -1285,7 +1285,13 @@ function theme_search_page($results, $type) {
}
function search_forms() {
$forms['search_theme_form']['callback'] = 'search_box';
$forms['search_block_form']['callback'] = 'search_box';
$forms['search_theme_form']= array(
'callback' => 'search_box',
'callback arguments' => array('search_theme_form'),
);
$forms['search_block_form']= array(
'callback' => 'search_box',
'callback arguments' => array('search_block_form'),
);
return $forms;
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment