Add/Update web/assets/js/main.js (Batch 3: Martel teardown + cold-audit intake form)

This commit is contained in:
2026-08-10 02:26:22 +00:00
parent d8815c17a8
commit 2d192d804a
+26
View File
@@ -34,4 +34,30 @@ document.addEventListener('DOMContentLoaded', () => {
approveBtn.classList.add('opacity-50', 'cursor-not-allowed'); approveBtn.classList.add('opacity-50', 'cursor-not-allowed');
rejectBtn.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 = '<strong>Protocol Initiated:</strong> 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);
});
}
}); });