From 85a64c83f8d866f7753ed14f6af04ae9202e5f6b Mon Sep 17 00:00:00 2001 From: serversdown Date: Mon, 22 Jun 2026 16:55:45 +0000 Subject: [PATCH] =?UTF-8?q?fix:=20classify=20button=20stuck=20on=20"Classi?= =?UTF-8?q?fying=E2=80=A6"=20on=20modal=20reopen?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit submitClassify()'s success path closes the modal and reloads the list but never resets the submit button (only the error paths did), and openClassifyModal() reset the form fields but not the button. So after a successful classify, the next modal opened with the button stuck disabled on "Classifying…" — only a full page refresh cleared it. Reset the submit button to "Classify"/enabled in openClassifyModal so every open starts clean regardless of how the previous one ended. Co-Authored-By: Claude Opus 4.8 (1M context) --- templates/admin/pending_deployments.html | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/templates/admin/pending_deployments.html b/templates/admin/pending_deployments.html index 1d22ffd..04df4fe 100644 --- a/templates/admin/pending_deployments.html +++ b/templates/admin/pending_deployments.html @@ -266,6 +266,12 @@ async function openClassifyModal(pendingId) { document.getElementById('new-project-name').value = ''; document.getElementById('new-location-name').value = ''; + // Reset the submit button — the success path closes the modal without + // clearing it, so without this it stays stuck on "Classifying…" on reopen. + const submitBtn = document.getElementById('classify-submit'); + submitBtn.disabled = false; + submitBtn.textContent = 'Classify'; + // Coords hint for "use captured coords" checkbox. const hint = document.getElementById('captured-coords-hint'); if (pd.coordinates) {