From da9796755a9bfff02d328e15a2b4d0d92866b9ee Mon Sep 17 00:00:00 2001 From: ilham_gmail Date: Thu, 11 Jun 2026 22:00:30 +0700 Subject: [PATCH] Ensure submit button is enabled on modal open and close --- poverty-mapping/index.html | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/poverty-mapping/index.html b/poverty-mapping/index.html index 686932e..ee154f8 100644 --- a/poverty-mapping/index.html +++ b/poverty-mapping/index.html @@ -504,6 +504,10 @@ function openAuthModal(mode){ const submitBtn = document.getElementById('auth-modal-submit'); const modal = document.getElementById('auth-modal'); + if(submitBtn) { + submitBtn.disabled = false; + } + // Reset registration verification state if(mode === 'login'){ authRegisterState = { code_sent: false, code: null, email: null }; @@ -810,7 +814,14 @@ function closeAuthModal(){ modal.setAttribute('aria-hidden','true'); // Reset form states const form = document.getElementById('auth-modal-form'); - if(form) form.reset(); + if(form) { + form.reset(); + const submitBtn = form.querySelector('button[type="submit"]') || document.getElementById('auth-modal-submit'); + if(submitBtn) { + submitBtn.disabled = false; + submitBtn.textContent = 'Kirim'; + } + } authRegisterState = { code_sent: false, code: null, email: null }; }