From c2dfefcc1e8a369d1557e2cfe52c5daa3df7156e Mon Sep 17 00:00:00 2001 From: Deeman Date: Sat, 28 Feb 2026 21:37:35 +0100 Subject: [PATCH] fix(affiliate): fire preview on page load so edit form shows card immediately hx-trigger="load, input from:..." fires the preview POST as soon as the page opens, so editing an existing product shows its card without needing to touch any field first. Co-Authored-By: Claude Sonnet 4.6 --- .../padelnomics/admin/templates/admin/affiliate_form.html | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/web/src/padelnomics/admin/templates/admin/affiliate_form.html b/web/src/padelnomics/admin/templates/admin/affiliate_form.html index b17c7d3..97b958a 100644 --- a/web/src/padelnomics/admin/templates/admin/affiliate_form.html +++ b/web/src/padelnomics/admin/templates/admin/affiliate_form.html @@ -39,10 +39,10 @@ document.addEventListener('DOMContentLoaded', function() {
{# ── Left: form ── #} - {# Invisible trigger: fires preview on any input change, includes the whole form #} + {# Invisible trigger: fires preview on page load + any input change #}
@@ -204,9 +204,7 @@ document.addEventListener('DOMContentLoaded', function() {
Preview
-

- Fill in the form to see a live preview. -

+

Loading preview…