diff options
Diffstat (limited to 'views/mods/mod_revocation/ajaxDialogContent.phtml')
| -rw-r--r-- | views/mods/mod_revocation/ajaxDialogContent.phtml | 45 |
1 files changed, 24 insertions, 21 deletions
diff --git a/views/mods/mod_revocation/ajaxDialogContent.phtml b/views/mods/mod_revocation/ajaxDialogContent.phtml index 8d27bbc..fd160f0 100644 --- a/views/mods/mod_revocation/ajaxDialogContent.phtml +++ b/views/mods/mod_revocation/ajaxDialogContent.phtml @@ -52,27 +52,28 @@ $arReason = \wpsgRevocation\Revocation::getReasons(); if (!$oOrder->isLoaded() || !$oOrderProduct->isLoaded()) continue; $key = $order_id.'_'.$order_product_id; + $id = 'wpsg_rvd_'.$key; // eindeutige ids für die Beschriftungen (W5) ?> <fieldset class="wpsg_revocation_order_product"> - <legend><?php echo $oOrderProduct->getProduct()->getProductName(); ?></legend> + <legend><?php echo \esc_html((string)$oOrderProduct->getProduct()->getProductName()); ?></legend> <div> - <input type="hidden" readonly name="wpsg_revocation_reason[row][<?php echo $key; ?>][order_product_id]" value="<?php echo $oOrderProduct->getId(); ?>" /> + <input type="hidden" readonly name="wpsg_revocation_reason[row][<?php echo $key; ?>][order_product_id]" value="<?php echo intval($oOrderProduct->getId()); ?>" /> <div class="form_field"> - <div class="label"><?php echo __('Bestellnummer / Menge', 'wpsg'); ?></div> + <label class="label" for="<?php echo $id; ?>_order_nr"><?php echo __('Bestellnummer / Menge', 'wpsg'); ?></label> <div class="value"> - <input type="text" readonly name="wpsg_revocation_reason[row][<?php echo $key; ?>][order_nr]" value="<?php echo $oOrder->getNr(); ?>" /> - <input type="number" min="1" max="<?php echo $amount; ?>" name="wpsg_revocation_reason[row][<?php echo $key; ?>][amount]" value="<?php echo $amount; ?>" /> + <input type="text" readonly id="<?php echo $id; ?>_order_nr" name="wpsg_revocation_reason[row][<?php echo $key; ?>][order_nr]" value="<?php echo \esc_attr((string)$oOrder->getNr()); ?>" /> + <input type="number" min="1" max="<?php echo $amount; ?>" aria-label="<?php echo \esc_attr__('Menge', 'wpsg'); ?>" name="wpsg_revocation_reason[row][<?php echo $key; ?>][amount]" value="<?php echo $amount; ?>" /> </div> </div> <div class="form_field"> - <div class="label"><?php echo __('Widerrufsgrund', 'wpsg'); ?></div> + <label class="label" for="<?php echo $id; ?>_reason"><?php echo __('Widerrufsgrund', 'wpsg'); ?></label> <div class="value"> - <select name="wpsg_revocation_reason[row][<?php echo $key; ?>][reason]"> + <select id="<?php echo $id; ?>_reason" name="wpsg_revocation_reason[row][<?php echo $key; ?>][reason]"> <option value=""><?php echo __("Keinen Grund angeben", 'wpsg') ?></option> <?php foreach ($arReason as $reason) { ?> <option value="<?php echo htmlspecialchars($reason['id']); ?>"><?php echo htmlspecialchars($reason['text']); ?></option> @@ -82,9 +83,9 @@ $arReason = \wpsgRevocation\Revocation::getReasons(); </div> <div class="form_field"> - <div class="label"><?php echo __('Bemerkung', 'wpsg'); ?></div> + <label class="label" for="<?php echo $id; ?>_comment"><?php echo __('Bemerkung', 'wpsg'); ?></label> <div class="value"> - <textarea name="wpsg_revocation_reason[row][<?php echo $key; ?>][comment]"></textarea> + <textarea id="<?php echo $id; ?>_comment" name="wpsg_revocation_reason[row][<?php echo $key; ?>][comment]"></textarea> </div> </div> @@ -96,30 +97,31 @@ $arReason = \wpsgRevocation\Revocation::getReasons(); <?php } else { $key = 0; + $id = 'wpsg_rvd_0'; ?> <fieldset class="wpsg_revocation_order_product"> <div class="form_field"> - <div class="label"><?php echo __('Artikel - Nr.', 'wpsg'); ?></div> + <label class="label" for="<?php echo $id; ?>_product_nr"><?php echo __('Artikel - Nr.', 'wpsg'); ?></label> <div class="value"> - <input type="text" name="wpsg_revocation_reason[row][<?php echo $key; ?>][product_nr]" value="<?php echo ($dialog_config['set_product_anr']??''); ?>" /> + <input type="text" id="<?php echo $id; ?>_product_nr" name="wpsg_revocation_reason[row][<?php echo $key; ?>][product_nr]" value="<?php echo \esc_attr((string)($dialog_config['set_product_anr']??'')); ?>" /> </div> </div> <div class="form_field"> - <div class="label"><?php echo __('Bestellnummer / Menge', 'wpsg'); ?></div> + <label class="label" for="<?php echo $id; ?>_order_nr"><?php echo __('Bestellnummer / Menge', 'wpsg'); ?></label> <div class="value"> - <input type="text" name="wpsg_revocation_reason[row][<?php echo $key; ?>][order_nr]" value="" /> - <input type="number" name="wpsg_revocation_reason[row][<?php echo $key; ?>][amount]" value="1" /> + <input type="text" id="<?php echo $id; ?>_order_nr" name="wpsg_revocation_reason[row][<?php echo $key; ?>][order_nr]" value="" /> + <input type="number" aria-label="<?php echo \esc_attr__('Menge', 'wpsg'); ?>" name="wpsg_revocation_reason[row][<?php echo $key; ?>][amount]" value="1" /> </div> </div> <div class="form_field"> - <div class="label"><?php echo __('Widerrufsgrund', 'wpsg'); ?></div> + <label class="label" for="<?php echo $id; ?>_reason"><?php echo __('Widerrufsgrund', 'wpsg'); ?></label> <div class="value"> - <select name="wpsg_revocation_reason[row][<?php echo $key; ?>][reason]"> + <select id="<?php echo $id; ?>_reason" name="wpsg_revocation_reason[row][<?php echo $key; ?>][reason]"> <option value=""><?php echo __("Keinen Grund angeben", 'wpsg') ?></option> <?php foreach ($arReason as $reason) { ?> <option value="<?php echo htmlspecialchars($reason['id']); ?>"><?php echo htmlspecialchars($reason['text']); ?></option> @@ -129,9 +131,9 @@ $arReason = \wpsgRevocation\Revocation::getReasons(); </div> <div class="form_field"> - <div class="label"><?php echo __('Bemerkung', 'wpsg'); ?></div> + <label class="label" for="<?php echo $id; ?>_comment"><?php echo __('Bemerkung', 'wpsg'); ?></label> <div class="value"> - <textarea name="wpsg_revocation_reason[row][<?php echo $key; ?>][comment]"></textarea> + <textarea id="<?php echo $id; ?>_comment" name="wpsg_revocation_reason[row][<?php echo $key; ?>][comment]"></textarea> </div> </div> @@ -140,16 +142,17 @@ $arReason = \wpsgRevocation\Revocation::getReasons(); <?php } ?> <div class="form_field"> - <div class="label"><?php echo __('Kontakt - E-Mail', 'wpsg'); ?></div> + <label class="label" for="wpsg_rvd_contact"><?php echo __('Kontakt - E-Mail', 'wpsg'); ?></label> <div class="value"> - <input type="email" required name="wpsg_revocation_reason[contact]" value="<?php echo $contact_email; ?>" + <input type="email" required id="wpsg_rvd_contact" autocomplete="email" name="wpsg_revocation_reason[contact]" value="<?php echo \esc_attr($contact_email); ?>" <?php echo (($contact_email !== '')?'readonly':''); ?> /> </div> </div> <p> - Es gelten unsere <?php echo '<a href="' . \wpsg_ShopController::getShop()->getURL(wpsg_ShopController::URL_DATENSCHUTZ) . '">Datenschutzbestimmungen</a>' ?> + <?php echo \esc_html__('Es gelten unsere', 'wpsg'); ?> + <a href="<?php echo \esc_url(\wpsg_ShopController::getShop()->getURL(wpsg_ShopController::URL_DATENSCHUTZ)); ?>"><?php echo \esc_html__('Datenschutzbestimmungen', 'wpsg'); ?></a>. </p> </form>
\ No newline at end of file |
