Code development platform for open source projects from the European Union institutions

Skip to content
Snippets Groups Projects
Commit d330438e authored by escuriola's avatar escuriola
Browse files

OEL-1367: Suggestion only to the search form.

parent e7b112a5
No related branches found
No related tags found
2 merge requests!157OEL-1668: Update epic list pages.,!136OEL-1367: New Look & Feel for search form in search page and remove theming from block config form.
......@@ -2,7 +2,7 @@
/**
* @file
* OE Whitelabel Search Module.
* Module file used for theming the search feature.
*/
declare(strict_types = 1);
......@@ -56,7 +56,7 @@ function oe_whitelabel_search_preprocess_facets_summary_item_list(array &$variab
* Add suggestions based on the block region where the form is placed.
*/
function oe_whitelabel_search_theme_suggestions_form_alter(array &$suggestions, array $variables): void {
if (empty($variables['element']['#form_id'])) {
if (!isset($variables['element']['#form_id']) || $variables['element']['#form_id'] !== 'oe_whitelabel_search_form') {
return;
}
......@@ -70,7 +70,7 @@ function oe_whitelabel_search_theme_suggestions_form_alter(array &$suggestions,
* Specify a suggestion for the form_element based on the form id.
*/
function oe_whitelabel_search_theme_suggestions_form_element_alter(array &$suggestions, array $variables): void {
if (empty($variables['element']['#form_id'])) {
if (!isset($variables['element']['#form_id']) || $variables['element']['#form_id'] !== 'oe_whitelabel_search_form') {
return;
}
......
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