summaryrefslogtreecommitdiff
path: root/views/mods
diff options
context:
space:
mode:
authorRoger Rehnelt <noreply@maennchen1.de>2026-10-01 21:08:26 +0200
committerRoger Rehnelt <noreply@maennchen1.de>2026-10-01 21:08:26 +0200
commitc2d7f4af6b45f503c1a6467575b7744b56e0a1b9 (patch)
treeebca8ee1541216355413a1b3df00153a0dc9905f /views/mods
parent825666d22ee30d5f42ed0e84beb9193569ac7a35 (diff)
Widerruf: Bestätigung als Meldung im Dialog
Statt alert() steht der Eingang als Statusmeldung mit Fokus im Dialog. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'views/mods')
-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 = {