From aedfbf948ee51e4565d53417f012441112b1260f Mon Sep 17 00:00:00 2001
From: imperosol
Date: Sun, 20 Sep 2026 23:07:09 +0200
Subject: [PATCH] fix: `htmx:after:swap` was still using old syntax
---
counter/static/bundled/counter/counter-click-index.ts | 8 ++++----
counter/templates/counter/counter_click.jinja | 2 +-
eboutic/templates/eboutic/eboutic_checkout.jinja | 2 +-
3 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/counter/static/bundled/counter/counter-click-index.ts b/counter/static/bundled/counter/counter-click-index.ts
index 5504cd12..7ec9abc2 100644
--- a/counter/static/bundled/counter/counter-click-index.ts
+++ b/counter/static/bundled/counter/counter-click-index.ts
@@ -123,14 +123,14 @@ document.addEventListener("alpine:init", () => {
onRefillingSuccess(event: CustomEvent) {
if (
- event.type !== "htmx:after-swap" ||
- event.detail.failed ||
- event.detail.elt.querySelector(".errorlist")
+ event.type !== "htmx:after:swap" ||
+ event.detail.ctx.response.status !== 200 ||
+ event.detail.ctx.target.querySelector(".errorlist")
) {
return;
}
this.customerBalance += Number.parseFloat(
- (event.detail.target.querySelector("#id_amount") as HTMLInputElement).value,
+ (event.detail.ctx.target.querySelector("#id_amount") as HTMLInputElement).value,
);
document.getElementById("selling-accordion")?.setAttribute("open", "");
this.codeField?.widget.focus();
diff --git a/counter/templates/counter/counter_click.jinja b/counter/templates/counter/counter_click.jinja
index d18f025e..bccc6f09 100644
--- a/counter/templates/counter/counter_click.jinja
+++ b/counter/templates/counter/counter_click.jinja
@@ -186,7 +186,7 @@
{% if refilling_fragment %}
{{ refilling_fragment }}
diff --git a/eboutic/templates/eboutic/eboutic_checkout.jinja b/eboutic/templates/eboutic/eboutic_checkout.jinja
index 277f4ee1..3b60060a 100644
--- a/eboutic/templates/eboutic/eboutic_checkout.jinja
+++ b/eboutic/templates/eboutic/eboutic_checkout.jinja
@@ -60,7 +60,7 @@
{% if settings.SITH_EBOUTIC_CB_ENABLED %}
-
+
{{ billing_infos_form }}
{% endif %}