From 67cc028de0736c8802ea8b4f3ff2e27b7d7df492 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Risto=20Nyk=C3=A4nen?= Date: Mon, 2 Feb 2026 14:34:16 +0200 Subject: [PATCH 1/5] UHF-12819: query does not allow array of values by default. IN-operator may have multiple values --- .../src/Plugin/views/filter/SchoolDetailsBase.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/modules/custom/helfi_kasko_content/src/Plugin/views/filter/SchoolDetailsBase.php b/public/modules/custom/helfi_kasko_content/src/Plugin/views/filter/SchoolDetailsBase.php index 541b65898..04e350da3 100644 --- a/public/modules/custom/helfi_kasko_content/src/Plugin/views/filter/SchoolDetailsBase.php +++ b/public/modules/custom/helfi_kasko_content/src/Plugin/views/filter/SchoolDetailsBase.php @@ -93,7 +93,7 @@ protected function queryByWordId(int $wordId) { $this->query->addWhere('AND', 'di.detail_items_schoolyear', $schoolYear); } - $this->query->addWhere('AND', 'di.detail_items_clarification', $this->value); + $this->query->addWhere('AND', 'di.detail_items_clarification', $this->value, 'IN'); } /** From cdb70b7baf003760c95686d0f00d4bda61e22de1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Risto=20Nyk=C3=A4nen?= Date: Tue, 3 Feb 2026 15:08:39 +0200 Subject: [PATCH 2/5] UHF-12819: Disable the field with css. Disabling with js causes ajax errors on backend --- .../hdbt_subtheme/src/js/high-school-search.js | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/public/themes/custom/hdbt_subtheme/src/js/high-school-search.js b/public/themes/custom/hdbt_subtheme/src/js/high-school-search.js index 98a8a6680..399e027f3 100644 --- a/public/themes/custom/hdbt_subtheme/src/js/high-school-search.js +++ b/public/themes/custom/hdbt_subtheme/src/js/high-school-search.js @@ -11,13 +11,17 @@ 'filters that were dimmed, select the option "All" on the selected filter.', ); select.parentElement?.classList.add('hdbt--select-wrapper--disabled'); - select.disabled = true; - select.dataset.ariaDisabled = 'true'; + + // Disabling the field with js interferes with ajax. + select.classList.add('disabled', 'noclick'); + select.value = 'All'; + select.setAttribute('aria-disabled', 'true'); } else { helpText.textContent = ''; + + select.classList.remove('disabled', 'noclick'); select.parentElement?.classList.remove('hdbt--select-wrapper--disabled'); - select.disabled = false; - select.dataset.ariaDisabled = 'false'; + select.setAttribute('aria-disabled', 'false'); } }; From 79684d1f6e8e1f823bd1d000b36240550974fe77 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Risto=20Nyk=C3=A4nen?= Date: Tue, 3 Feb 2026 15:09:15 +0200 Subject: [PATCH 3/5] UHF-12819: replace bad comment with accurate one --- .../themes/custom/hdbt_subtheme/src/js/high-school-search.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/public/themes/custom/hdbt_subtheme/src/js/high-school-search.js b/public/themes/custom/hdbt_subtheme/src/js/high-school-search.js index 399e027f3..65a34d886 100644 --- a/public/themes/custom/hdbt_subtheme/src/js/high-school-search.js +++ b/public/themes/custom/hdbt_subtheme/src/js/high-school-search.js @@ -25,8 +25,7 @@ } }; - // Disable all other selects except the one that has some OTHER option selected - // than 'All' and enable them all if they all have 'All' option selected. + // Only one of the two emphasis fields may be selected. const disableOtherSelects = (selected, selectElements) => { if (selected.value !== 'All') { /** biome-ignore lint/suspicious/useIterableCallbackReturn: @todo UHF-12501 */ From ec6fca65642cd69d15a94cdcb5dd4af9a66bda64 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Risto=20Nyk=C3=A4nen?= Date: Tue, 3 Feb 2026 15:09:34 +0200 Subject: [PATCH 4/5] UHF-12819: built code --- .../custom/hdbt_subtheme/dist/js/high-school-search.min.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/themes/custom/hdbt_subtheme/dist/js/high-school-search.min.js b/public/themes/custom/hdbt_subtheme/dist/js/high-school-search.min.js index 95cd5f51b..0adad9ec5 100644 --- a/public/themes/custom/hdbt_subtheme/dist/js/high-school-search.min.js +++ b/public/themes/custom/hdbt_subtheme/dist/js/high-school-search.min.js @@ -1 +1 @@ -(()=>{var e=Object.defineProperty;var t=(t,a)=>e(t,"name",{value:a,configurable:true});(Drupal=>{Drupal.behaviors.HighSchoolSearch={attach:t(function e(a){const s=t((e,t)=>{const a=e.nextElementSibling;if(t){a.textContent=Drupal.t('Filter on the form has been selected and some of the other filters might be dimmed because of your selection. To use the filters that were dimmed, select the option "All" on the selected filter.');e.parentElement?.classList.add("hdbt--select-wrapper--disabled");e.disabled=true;e.dataset.ariaDisabled="true"}else{a.textContent="";e.parentElement?.classList.remove("hdbt--select-wrapper--disabled");e.disabled=false;e.dataset.ariaDisabled="false"}},"toggleSelectActivity");const l=t((e,t)=>{if(e.value!=="All"){t.forEach(t=>s(t,t!==e))}else{t.forEach(t=>{if(t!==e){s(t,false)}})}},"disableOtherSelects");const i=a.querySelectorAll(".unit-search--high-school .js-form-item-emphasis .form-select, .unit-search--high-school .js-form-item-mission .form-select");i.forEach(e=>l(e,i));i.forEach(e=>{e.addEventListener("change",()=>l(e,i))})},"attach")}})(Drupal)})(); \ No newline at end of file +(()=>{var e=Object.defineProperty;var t=(t,s)=>e(t,"name",{value:s,configurable:true});(Drupal=>{Drupal.behaviors.HighSchoolSearch={attach:t(function e(s){const l=t((e,t)=>{const s=e.nextElementSibling;if(t){s.textContent=Drupal.t('Filter on the form has been selected and some of the other filters might be dimmed because of your selection. To use the filters that were dimmed, select the option "All" on the selected filter.');e.parentElement?.classList.add("hdbt--select-wrapper--disabled");e.classList.add("disabled","noclick");e.value="All";e.setAttribute("aria-disabled","true")}else{s.textContent="";e.classList.remove("disabled","noclick");e.parentElement?.classList.remove("hdbt--select-wrapper--disabled");e.setAttribute("aria-disabled","false")}},"toggleSelectActivity");const a=t((e,t)=>{if(e.value!=="All"){t.forEach(t=>l(t,t!==e))}else{t.forEach(t=>{if(t!==e){l(t,false)}})}},"disableOtherSelects");const i=s.querySelectorAll(".unit-search--high-school .js-form-item-emphasis .form-select, .unit-search--high-school .js-form-item-mission .form-select");i.forEach(e=>a(e,i));i.forEach(e=>{e.addEventListener("change",()=>a(e,i))})},"attach")}})(Drupal)})(); \ No newline at end of file From edce67d871be9fe1804af3f64beda8c611a906bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Risto=20Nyk=C3=A4nen?= Date: Wed, 4 Feb 2026 07:50:07 +0200 Subject: [PATCH 5/5] UHF-12819: better comment --- public/themes/custom/hdbt_subtheme/src/js/high-school-search.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/themes/custom/hdbt_subtheme/src/js/high-school-search.js b/public/themes/custom/hdbt_subtheme/src/js/high-school-search.js index 65a34d886..27eafd3e7 100644 --- a/public/themes/custom/hdbt_subtheme/src/js/high-school-search.js +++ b/public/themes/custom/hdbt_subtheme/src/js/high-school-search.js @@ -12,7 +12,7 @@ ); select.parentElement?.classList.add('hdbt--select-wrapper--disabled'); - // Disabling the field with js interferes with ajax. + // Disabling the field by `select.disabled=true` interferes with ajax. select.classList.add('disabled', 'noclick'); select.value = 'All'; select.setAttribute('aria-disabled', 'true');