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

Skip to content
Snippets Groups Projects
Commit 9aa37941 authored by Andreas Hennings's avatar Andreas Hennings Committed by escuriola
Browse files

OEL-1367: Simplify how the region is added to block settings on submit.

parent df3d1de3
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.
......@@ -216,7 +216,7 @@ class SearchBlock extends BlockBase implements ContainerFactoryPluginInterface {
$values = $form_state->getValues();
$this->setConfigurationValue('form', [
'action' => $form_state->getValue('form_action'),
'region' => $form_state->getValue('region'),
'region' => $form_state->getCompleteFormState()->getValue('region'),
]);
$input = $values['input'];
$this->setConfigurationValue('input', [
......@@ -241,9 +241,6 @@ class SearchBlock extends BlockBase implements ContainerFactoryPluginInterface {
public function blockValidate($form, FormStateInterface $form_state): void {
$values = $form_state->getValues();
$completeForm = $form_state->getCompleteForm();
$form_state->setValue('region', $completeForm['region']['#value']);
if (!$this->moduleHandler->moduleExists('views') || !$this->moduleHandler->moduleExists('search_api_autocomplete')) {
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