From 87eb5fa1f085001852f5e2a54063269f0f8daacb Mon Sep 17 00:00:00 2001 From: John Mizerek Date: Tue, 10 Mar 2026 18:07:54 -0700 Subject: [PATCH] Fix takeaway/pickup toggle not saving in Firefox Wire onchange listener via JS instead of inline attribute, matching the hiring toggle pattern. The zero-sized hidden checkbox wasn't firing inline onchange reliably. Co-Authored-By: Claude Opus 4.6 --- portal/index.html | 2 +- portal/portal.js | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/portal/index.html b/portal/index.html index fa26320..c2b051b 100644 --- a/portal/index.html +++ b/portal/index.html @@ -705,7 +705,7 @@
Takeaway / Pickup diff --git a/portal/portal.js b/portal/portal.js index 945fd7c..a17c840 100644 --- a/portal/portal.js +++ b/portal/portal.js @@ -868,7 +868,10 @@ const Portal = { // Order types const orderTypes = (biz.ORDERTYPES || biz.OrderTypes || '1').split(','); const takeawayCheckbox = document.getElementById('orderTypeTakeaway'); - if (takeawayCheckbox) takeawayCheckbox.checked = orderTypes.includes('2'); + if (takeawayCheckbox) { + takeawayCheckbox.checked = orderTypes.includes('2'); + takeawayCheckbox.onchange = () => this.saveOrderTypes(); + } } } catch (err) { console.error('[Portal] Error loading business info:', err);