Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
TomConner committed Nov 22, 2023
1 parent cf380cb commit 8e37a29
Showing 1 changed file with 25 additions and 1 deletion.
26 changes: 25 additions & 1 deletion generator/content/confirm/stripe-return.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,28 @@ document.addEventListener('DOMContentLoaded', async () => {
window.parent.postMessage({
'frameHeight': height
}, 'https://dev.troop105treedrive.com');
});
function showMessage(messageText) {
const messageContainer = document.querySelector("#payment-message");

messageContainer.classList.remove("hidden");
messageContainer.textContent = messageText;

setTimeout(function () {
messageContainer.classList.add("hidden");
messageContainer.textContent = "";
}, 4000);
}

// Show a spinner on payment submission
function setLoading(isLoading) {
if (isLoading) {
// Disable the button and show a spinner
document.querySelector("#submit").disabled = true;
document.querySelector("#spinner").classList.remove("hidden");
document.querySelector("#button-text").classList.add("hidden");
} else {
document.querySelector("#submit").disabled = false;
document.querySelector("#spinner").classList.add("hidden");
document.querySelector("#button-text").classList.remove("hidden");
}
}});

0 comments on commit 8e37a29

Please sign in to comment.