This commit is contained in:
Denis Bunevich
2025-11-24 12:31:10 +01:00
parent be484cb33d
commit 4aa2dd96f4
4 changed files with 39 additions and 3 deletions

View File

@@ -0,0 +1,36 @@
<?php
/**
* Template Name: Resource Item
*/
get_header();
if (have_posts()):
while (have_posts()):
the_post();
?>
<div class="content">
<?= the_content(); ?>
<script>
document.addEventListener("DOMContentLoaded", (event) => {
document.addEventListener( 'wpcf7submit', ( event ) => {
console.log("submit");
},false);
document.addEventListener( 'wpcf7mailsent', ( event ) => {
if (!pdfUrl) {
console.warn("please add pdfUrl");
return;
}
window.open(pdfUrl, "_self");
}, false );
});
</script>
</div>
<?php
endwhile;
endif;
get_footer();