summaryrefslogtreecommitdiff
path: root/views/mods/mod_revocation/wp_footer.phtml
diff options
context:
space:
mode:
Diffstat (limited to 'views/mods/mod_revocation/wp_footer.phtml')
-rw-r--r--views/mods/mod_revocation/wp_footer.phtml19
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);