diff options
Diffstat (limited to 'views/mods/mod_revocation/page_form.phtml')
| -rw-r--r-- | views/mods/mod_revocation/page_form.phtml | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/views/mods/mod_revocation/page_form.phtml b/views/mods/mod_revocation/page_form.phtml index c444916..f76b2b8 100644 --- a/views/mods/mod_revocation/page_form.phtml +++ b/views/mods/mod_revocation/page_form.phtml @@ -19,12 +19,14 @@ // Vorbelegung des Kontaktfeldes für eingeloggte Kunden $contact_email = ''; + $contact_name = ''; $customer_login_id = intval(\wpsg_ShopController::getShop()->callMod('wpsg_mod_kundenverwaltung', 'isLoggedIn')); if ($customer_login_id > 0) { $oCustomer = \wpsg_customer::getInstance($customer_login_id); $contact_email = $oCustomer->getEmail(); + $contact_name = trim($oCustomer->getFirstname().' '.$oCustomer->getName()); } @@ -33,6 +35,7 @@ $get_product = isset($_GET['wpsg_revo_product']) ? \sanitize_text_field($_GET['wpsg_revo_product']) : ''; $get_amount = isset($_GET['wpsg_revo_amount']) ? max(1, intval($_GET['wpsg_revo_amount'])) : 1; $get_contact = isset($_GET['wpsg_revo_contact']) ? \sanitize_email($_GET['wpsg_revo_contact']) : ''; + $get_key = isset($_GET['wpsg_revo_key']) ? \sanitize_key($_GET['wpsg_revo_key']) : ''; // Schlüssel aus der Bestellmail (S18) if ($contact_email === '' && $get_contact !== '' && \is_email($get_contact)) $contact_email = $get_contact; @@ -85,6 +88,15 @@ </fieldset> <div class="form_field"> + <label class="label" for="wpsg_rvp_name"><?php echo \__('Name', 'wpsg'); ?></label> + <div class="value"> + <input type="text" required id="wpsg_rvp_name" autocomplete="name" name="wpsg_revocation_reason[name]" value="<?php echo \esc_attr($contact_name); ?>" /> + </div> + </div> + + <input type="hidden" name="wpsg_revocation_reason[key]" value="<?php echo \esc_attr($get_key); ?>" /> + + <div class="form_field"> <label class="label" for="wpsg_rvp_contact"><?php echo \__('Kontakt - E-Mail', 'wpsg'); ?></label> <div class="value"> <input type="email" required id="wpsg_rvp_contact" autocomplete="email" name="wpsg_revocation_reason[contact]" value="<?php echo \esc_attr($contact_email); ?>" @@ -194,7 +206,7 @@ } else { form.style.display = 'none'; - msg.innerHTML = '<div class="wpsg_revocation_page_success"><?php echo \esc_js(\__('Ihr Widerruf ist bei uns eingegangen und wird nun bearbeitet.', 'wpsg')); ?></div>'; + msg.innerHTML = '<div class="wpsg_revocation_page_success"><?php echo \esc_js(\__('Ihre Widerrufserklärung ist eingegangen. Die Eingangsbestätigung geht an die angegebene E-Mail-Adresse.', 'wpsg')); ?></div>'; msg.scrollIntoView({ behavior: 'smooth', block: 'center' }); } |
