From a8cdfc65f640fd7b38e29a7506ff4d6496a92d8d Mon Sep 17 00:00:00 2001 From: justin Date: Fri, 22 May 2026 01:30:26 -0500 Subject: [PATCH] Fix: promo re-render trigger used wrong checkbox selector Was looking for .svc-cb:checked but checkboxes use input[data-slug]:checked. Discount display never updated after promo info loaded. Co-Authored-By: Claude Opus 4.6 (1M context) --- site/public/order/fcc-compliance/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/site/public/order/fcc-compliance/index.html b/site/public/order/fcc-compliance/index.html index 4c06e13..6c53058 100644 --- a/site/public/order/fcc-compliance/index.html +++ b/site/public/order/fcc-compliance/index.html @@ -195,7 +195,7 @@ var entityBar=document.getElementById("pw-entity-bar"); var bundleTip=document.getElementById("pw-bundle-tip"); // Fetch promo code info from API if present -if(promoFromUrl){var discUrl=API+"/api/v1/discount/"+encodeURIComponent(promoFromUrl)+(emailFromUrl?"?email="+encodeURIComponent(emailFromUrl):"");fetch(discUrl).then(function(r){return r.json()}).then(function(d){if(d.valid){window._promoInfo=d;var cb=document.querySelector(".svc-cb:checked");if(cb)cb.dispatchEvent(new Event("change",{bubbles:true}));}else{window._promoInfo=null;promoFromUrl="";var pe=document.getElementById("pw-promo");if(pe){pe.value="";pe.readOnly=false;pe.style.background="";pe.style.borderColor="";}}}).catch(function(){});} +if(promoFromUrl){var discUrl=API+"/api/v1/discount/"+encodeURIComponent(promoFromUrl)+(emailFromUrl?"?email="+encodeURIComponent(emailFromUrl):"");fetch(discUrl).then(function(r){return r.json()}).then(function(d){if(d.valid){window._promoInfo=d;var cb=document.querySelector("input[data-slug]:checked");if(cb)cb.dispatchEvent(new Event("change",{bubbles:true}));}else{window._promoInfo=null;promoFromUrl="";var pe=document.getElementById("pw-promo");if(pe){pe.value="";pe.readOnly=false;pe.style.background="";pe.style.borderColor="";}}}).catch(function(){});} if(frn){ fetch(API+"/api/v1/fcc/lookup?frn="+frn+"&quick=1").then(function(r){return r.json()}).then(function(d){