diff options
| author | Jean-Luc Beer <noreply@maennchen1.de> | 2026-07-01 05:57:32 +0000 |
|---|---|---|
| committer | Jean-Luc Beer <noreply@maennchen1.de> | 2026-07-01 05:57:32 +0000 |
| commit | c49c6c3b5ebfbef2b47567104043abb2f0229cc4 (patch) | |
| tree | a9a02d89f4d03e3f9123986cd73c5ab9758b8ad7 /views/mods/mod_revocation/wp_footer.phtml | |
| parent | 9a13412960282e9f6a344c94f6ba87ab8bf25da8 (diff) | |
Widerrufsformular Shortcode + dedizierte wp_posts-Seite
git-svn-id: https://[internal]/wordpress/plugins/wpsg4@8535 0d5edaf7-2b12-4e95-93f4-047927463d4b
Diffstat (limited to 'views/mods/mod_revocation/wp_footer.phtml')
| -rw-r--r-- | views/mods/mod_revocation/wp_footer.phtml | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/views/mods/mod_revocation/wp_footer.phtml b/views/mods/mod_revocation/wp_footer.phtml index c51c586..3c4f9c8 100644 --- a/views/mods/mod_revocation/wp_footer.phtml +++ b/views/mods/mod_revocation/wp_footer.phtml @@ -200,7 +200,9 @@ }); - }; + setTimeout(() => {document.querySelector('[name="wpsg_revocation_reason[row][0][product_nr]"]')?.focus();}, 1000) + + }; // Button am Produkt document.querySelectorAll('.wpsg_revocation_product_button').forEach(el => { @@ -215,7 +217,20 @@ // Button Listener FlyOut document.getElementById('wpsg_revocation_button').addEventListener('click', event => { open_dialog(); }); - + + // Shortcode-Link Listener [wpshopgermany_widerruf] + document.addEventListener('click', event => { + + const link = event.target.closest('a.wpsg_revocation_link'); + + if (link === null) return; + + event.preventDefault(); + open_dialog(); + + }); + + // GET Parameter verarbeiten const urlParams = new URLSearchParams(window.location.search); |
