Merge pull request #13885 from atm-maxime/fix_top_menu_search
Fix top menu search method must be GET
This commit is contained in:
commit
30c167c6f4
@ -2002,7 +2002,7 @@ function top_menu_search()
|
||||
|
||||
$defaultAction = '';
|
||||
$buttonList = '<div class="dropdown-global-search-button-list" >';
|
||||
// Menu with all bookmarks
|
||||
// Menu with all searchable items
|
||||
foreach ($arrayresult as $keyItem => $item)
|
||||
{
|
||||
if (empty($defaultAction)) {
|
||||
@ -2017,9 +2017,7 @@ function top_menu_search()
|
||||
|
||||
$searchInput = '<input name="sall" id="top-global-search-input" class="dropdown-search-input" placeholder="'.$langs->trans('Search').'" autocomplete="off" >';
|
||||
|
||||
|
||||
$dropDownHtml = '<!-- form with POST method by default, will be replaced with GET for external link by js -->'."\n";
|
||||
$dropDownHtml .= '<form id="top-menu-action-bookmark" name="actionbookmark" method="POST" action="'.$defaultAction.'" >';
|
||||
$dropDownHtml = '<form id="top-menu-action-search" name="actionsearch" method="GET" action="'.$defaultAction.'" >';
|
||||
|
||||
$dropDownHtml .= '
|
||||
<!-- search input -->
|
||||
@ -2068,8 +2066,8 @@ function top_menu_search()
|
||||
|
||||
// submit form action
|
||||
$(".dropdown-global-search-button-list .global-search-item").on("click", function(event) {
|
||||
$("#top-menu-action-bookmark").attr("action", $(this).data("target"));
|
||||
$("#top-menu-action-bookmark").submit();
|
||||
$("#top-menu-action-search").attr("action", $(this).data("target"));
|
||||
$("#top-menu-action-search").submit();
|
||||
});
|
||||
|
||||
// close drop down
|
||||
|
||||
Loading…
Reference in New Issue
Block a user