forked from LiveCarta/LiveCartaWP
LAW-8882
This commit is contained in:
@@ -14,12 +14,19 @@
|
||||
|
||||
<script>
|
||||
document.addEventListener("DOMContentLoaded", (event) => {
|
||||
document.addEventListener( 'wpcf7submit', ( event ) => {
|
||||
console.log("submit");
|
||||
const btn = document.querySelector("#submit");
|
||||
btn.addEventListener("click", ( event ) => {
|
||||
btn.classList.add("btn-loading");
|
||||
},false);
|
||||
document.addEventListener( 'wpcf7invalid', ( event ) => {
|
||||
btn.classList.remove("btn-loading");
|
||||
},false);
|
||||
document.addEventListener( 'wpcf7mailfailed', ( event ) => {
|
||||
btn.classList.remove("btn-loading");
|
||||
},false);
|
||||
|
||||
document.addEventListener( 'wpcf7mailsent', ( event ) => {
|
||||
if (!pdfUrl) {
|
||||
if (typeof pdfUrl === "undefined") {
|
||||
console.warn("please add pdfUrl");
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user