From cd47aaba940a3bb844c04b9b1a007cf4b8f48cde Mon Sep 17 00:00:00 2001 From: Eli Ribble Date: Mon, 9 Mar 2026 22:22:04 +0000 Subject: [PATCH] Allow clicking on the entire care for seleting sources --- html/template/rmo/nuisance.html | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/html/template/rmo/nuisance.html b/html/template/rmo/nuisance.html index da4d3375..481064dd 100644 --- a/html/template/rmo/nuisance.html +++ b/html/template/rmo/nuisance.html @@ -173,6 +173,21 @@ setLocationInputs(l); }); + document.querySelectorAll(".source-card").forEach((card) => { + card.style.cursor = "pointer"; + card.addEventListener("click", function (e) { + // Don't toggle if user clicked directly on the checkbox or label + if (e.target.type === "checkbox" || e.target.tagName === "LABEL") { + return; + } + + const checkbox = this.querySelector(".form-check-input"); + checkbox.checked = !checkbox.checked; + + // Trigger change event in case you have listeners on the checkbox + checkbox.dispatchEvent(new Event("change", { bubbles: true })); + }); + }); });