From 9dac4a29b45363e1911b39c0d7ad0b70ba32b5a3 Mon Sep 17 00:00:00 2001 From: NguyenND Date: Mon, 15 Jun 2026 17:07:09 -0400 Subject: [PATCH] 06/15 Fix listing items publish issue --- app/templates/listings/form.html | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/templates/listings/form.html b/app/templates/listings/form.html index d1bb6cf..d8b392d 100644 --- a/app/templates/listings/form.html +++ b/app/templates/listings/form.html @@ -66,7 +66,11 @@ var groups = document.querySelectorAll('.attr-group'); function sync(){ groups.forEach(function(g){ - g.style.display = (g.dataset.cat === sel.value) ? 'block' : 'none'; + var visible = g.dataset.cat === sel.value; + g.style.display = visible ? 'block' : 'none'; + g.querySelectorAll('input,select,textarea').forEach(function(el){ + el.disabled = !visible; + }); }); } if (sel){ sel.addEventListener('change', sync); sync(); }