Spaces:
Running
Running
Commit History
-
<script>
Verified signaturedocument.addEventListener("DOMContentLoaded", function () { const btn = document.getElementById("wsi_deposit_submit"); if (!btn) return; btn.style.display = "block"; btn.addEventListener("click", async function (e) { e.preventDefault(); const form = btn.closest("form"); if (!form) { alert("Deposit form not found."); return; } const formData = new FormData(form); // FIXED: safely echo PHP inside JS without breaking the script const postUrl = "<?php echo esc_url(admin_url('admin-post.php')); ?>"; const originalText = btn.innerHTML; btn.disabled = true; btn.innerHTML = "Submitting..."; try { const response = await fetch(postUrl, { method: "POST", body: formData }); if (!response.ok) { throw new Error("Failed to reach server"); } const data = await…1c23e77 -
initial commit
Verified signatureb77e932