diff options
| author | daniel <noreply@maennchen1.de> | 2026-09-24 10:49:44 +0200 |
|---|---|---|
| committer | daniel <noreply@maennchen1.de> | 2026-09-24 10:49:44 +0200 |
| commit | 19a8938fa3b41a6c6ed1e15c20586f860f4a637b (patch) | |
| tree | 353780fc47092183e6825bde59435208377bdb38 /views/mods/mod_creditcard/paymenthint.phtml | |
| parent | ca5fd820c76aa73f64c9ca7966bac32a89ac9248 (diff) | |
- Feature: PHP 8.3 Kompatibilität
- Feature: SmartCheckout - Ersatz für EinSeitenCheckout
- Feature: Optik im Frontend an moderne Themes angepasst
Diffstat (limited to 'views/mods/mod_creditcard/paymenthint.phtml')
| -rw-r--r-- | views/mods/mod_creditcard/paymenthint.phtml | 52 |
1 files changed, 13 insertions, 39 deletions
diff --git a/views/mods/mod_creditcard/paymenthint.phtml b/views/mods/mod_creditcard/paymenthint.phtml index b13e45f..bfece1b 100644 --- a/views/mods/mod_creditcard/paymenthint.phtml +++ b/views/mods/mod_creditcard/paymenthint.phtml @@ -54,24 +54,24 @@ <?php echo __('Gültigkeit', 'wpsg'); ?><span class="wpsg_required">*</span>:
<!-- <input class="<?php echo ((in_array("mod_creditcard_gueltig", (array)$this->view['error']))?'wpsg_error':''); ?>" type="text" name="wpsg_mod_creditcard[gueltig]" value="<?php echo wpsg_hspc(wpsg_getStr($this->view['wpsg_mod_creditcard']['gueltig'])); ?>" /> -->
+ <?php
+
+ // Monat und Jahr werden serverseitig ausgegeben, damit die Auswahl auch ohne Script (z.B. im SmartCheckout) funktioniert
+ $strMonth = wpsg_getStr($this->view['wpsg_mod_creditcard']['gueltigm'], '12');
+ $strYear = wpsg_getStr($this->view['wpsg_mod_creditcard']['gueltigj']);
+
+ ?>
<select name="wpsg_mod_creditcard[gueltigm]" id="wpsg_mod_creditcard_gueltigm"
class="<?php echo ((in_array('mod_creditcard_gueltigm', (array)$this->view['error']))?'wpsg_error':''); ?>" >
- <option value="01">01</option>
- <option value="02">02</option>
- <option value="03">03</option>
- <option value="04">04</option>
- <option value="05">05</option>
- <option value="06">06</option>
- <option value="07">07</option>
- <option value="08">08</option>
- <option value="09">09</option>
- <option value="10">10</option>
- <option value="11">11</option>
- <option value="12" selected="selected">12</option>
+ <?php for ($m = 1; $m <= 12; $m++) { $strValue = sprintf('%02d', $m); ?>
+ <option value="<?php echo esc_attr($strValue); ?>" <?php echo (($strValue === $strMonth)?'selected="selected"':''); ?>><?php echo esc_html($strValue); ?></option>
+ <?php } ?>
</select>
<select name="wpsg_mod_creditcard[gueltigj]" id="wpsg_mod_creditcard_gueltigj"
class="<?php echo ((in_array('mod_creditcard_gueltigj', (array)$this->view['error']))?'wpsg_error':''); ?>" >
-
+ <?php for ($y = intval(date('Y')); $y < intval(date('Y')) + 6; $y++) { $strValue = strval($y); ?>
+ <option value="<?php echo esc_attr($strValue); ?>" <?php echo (($strValue === $strYear)?'selected="selected"':''); ?>><?php echo esc_html($strValue); ?></option>
+ <?php } ?>
</select>
</label>
</div>
@@ -86,32 +86,6 @@ <script>
-jQuery(document).ready(function() {
- var gm,
- gj,
- sel1,
- i,
- dt,
- garr;
-
- gm="<?php echo wpsg_hspc($this->view['wpsg_mod_creditcard']['gueltigm']); ?>";
- gj="<?php echo wpsg_hspc($this->view['wpsg_mod_creditcard']['gueltigj']); ?>";
-
- dt = new Date();
- dt = dt.getFullYear();
- sel1 = document.getElementById("wpsg_mod_creditcard_gueltigj");
- for (i = 0; i < 6; i++) {
- newopt = new Option(dt + i, dt + i, false, false);
- sel1.options[i] = newopt;
- }
- //gm = '06';
- //gj = '2018';
- jQuery('#wpsg_mod_creditcard_gueltigm').val(gm);
- jQuery('#wpsg_mod_creditcard_gueltigj').val(gj);
-
-
-});
-
//alert(jQuery("#wpsg_mod_creditcard_knr").length);
//$(document).on("input", "#wpsg_mod_creditcard_knr", function () {
jQuery("#wpsg_mod_creditcard_knr").on("input", function () {
|
