diff --git a/templates/engage/index.html b/templates/engage/index.html index 023a3914a15..91027e4b027 100644 --- a/templates/engage/index.html +++ b/templates/engage/index.html @@ -126,6 +126,21 @@

No results — why not try widening your search?

clearFiltersButton.removeAttribute("disabled"); } + // Disable other fields if a filter is already applied + const searchParams = new URLSearchParams(urlObj.search); + for (const [key, value] of searchParams) { + if (key === "language") { + resourceSelector.setAttribute("disabled", true); + tagSelector.setAttribute("disabled", true); + } else if (key === "resource") { + languageSelector.setAttribute("disabled", true); + tagSelector.setAttribute("disabled", true); + } else if (key === "tag") { + languageSelector.setAttribute("disabled", true); + resourceSelector.setAttribute("disabled", true); + } + } + function handleFilter(key, el, url) { if (!el) { return;