From 2d192d804a2dc2c1c62487dbd9e8f56ac93325e7 Mon Sep 17 00:00:00 2001 From: Tony Balascio Date: Mon, 10 Aug 2026 02:26:22 +0000 Subject: [PATCH] Add/Update web/assets/js/main.js (Batch 3: Martel teardown + cold-audit intake form) --- web/assets/js/main.js | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/web/assets/js/main.js b/web/assets/js/main.js index a76c815..7d5b361 100644 --- a/web/assets/js/main.js +++ b/web/assets/js/main.js @@ -34,4 +34,30 @@ document.addEventListener('DOMContentLoaded', () => { approveBtn.classList.add('opacity-50', 'cursor-not-allowed'); rejectBtn.classList.add('opacity-50', 'cursor-not-allowed'); } + + // --- COLD AUDIT FORM LOGIC --- + const auditForm = document.getElementById('audit-form'); + if (auditForm) { + auditForm.addEventListener('submit', async (e) => { + e.preventDefault(); + const submitBtn = document.getElementById('submit-btn'); + const formStatus = document.getElementById('form-status'); + + submitBtn.disabled = true; + submitBtn.textContent = 'Transmitting...'; + submitBtn.classList.add('opacity-75', 'cursor-not-allowed'); + + // Mocking the POST to Formspree / VPS Endpoint (74.208.111.99) + // In production, replace this setTimeout with a real fetch() POST + setTimeout(() => { + formStatus.className = 'mt-4 p-4 rounded border text-sm border-green-300 bg-green-50 text-green-800'; + formStatus.innerHTML = 'Protocol Initiated: Your Layer 1a Cold Audit request has been received. A human analyst will review your entity footprint within 24 hours.'; + formStatus.classList.remove('hidden'); + auditForm.reset(); + submitBtn.textContent = 'Initiate Audit'; + submitBtn.disabled = false; + submitBtn.classList.remove('opacity-75', 'cursor-not-allowed'); + }, 1500); + }); + } }); \ No newline at end of file