summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--views/mods/mod_revocation/wp_footer.phtml14
1 files changed, 12 insertions, 2 deletions
diff --git a/views/mods/mod_revocation/wp_footer.phtml b/views/mods/mod_revocation/wp_footer.phtml
index 4ca299a..bec1b82 100644
--- a/views/mods/mod_revocation/wp_footer.phtml
+++ b/views/mods/mod_revocation/wp_footer.phtml
@@ -165,8 +165,17 @@
} else {
- alert(<?php echo wp_json_encode(__('Ihr Widerruf ist bei uns eingegangen und wird nun bearbeitet.', 'wpsg')); ?>);
- close_dialog(event);
+ // Bestätigung im Dialog statt alert(): Statusmeldung mit Fokus, Absenden ausgeblendet
+ const success = document.createElement('div');
+ success.className = 'wpsg_revocation_page_success';
+ success.setAttribute('role', 'status');
+ success.tabIndex = -1;
+ success.textContent = <?php echo wp_json_encode(__('Ihr Widerruf ist bei uns eingegangen und wird nun bearbeitet.', 'wpsg')); ?>;
+
+ el_dialog_content.replaceChildren(success);
+ el_dialog.querySelector('.wpsg_revocation_button_submit').hidden = true;
+ el_dialog.classList.remove('loading');
+ success.focus();
document.querySelectorAll('.wpsg_revocation_order_product_checkbox:checked').forEach(el => {
@@ -209,6 +218,7 @@
el_dialog.removeAttribute('aria-hidden');
el_dialog.classList.add('visible');
el_dialog.classList.add('loading');
+ el_dialog.querySelector('.wpsg_revocation_button_submit').hidden = false;
el_dialog.querySelector('.inner').focus();
const dialog_config = {