diff options
Diffstat (limited to 'views/mods/mod_abo')
| -rw-r--r-- | views/mods/mod_abo/order_view.phtml | 40 |
1 files changed, 38 insertions, 2 deletions
diff --git a/views/mods/mod_abo/order_view.phtml b/views/mods/mod_abo/order_view.phtml index 29fc978..8ae6340 100644 --- a/views/mods/mod_abo/order_view.phtml +++ b/views/mods/mod_abo/order_view.phtml @@ -4,14 +4,50 @@ * Template für die Anzeige des Abo Statuses in der Hauptbestellung
*/
+ $view = $this->view['wpsg_mod_abo'];
?>
-
+
<?php foreach ($this->view['arOrderedAboProducts'] as $oOrderProduct) { ?>
<?php echo wpsg_drawForm_AdminboxStart($oOrderProduct->getProduct()->getProductName()); ?>
- <?php $tExpire = strtotime($this->callMod('wpsg_mod_abo', 'getOrderAboExpiration', Array($_REQUEST['edit_id'], $oOrderProduct->getProductKey()))); echo wpsg_drawForm_Text(__('Laufzeit', 'wpsg'), wpsg_formatTimestamp($tExpire), false, Array('class_content_wrap' => (($tExpire > time())?'wpsg_mod_abo_future_expire':'wpsg_mod_abo_expired'))); ?>
+ <?php $tExpire = strtotime($this->callMod('wpsg_mod_abo', 'getOrderAboExpiration', Array($_REQUEST['edit_id'], $oOrderProduct->getProductKey()))); ?>
+ <?php echo wpsg_drawForm_Text(__('Laufzeit', 'wpsg'), wpsg_formatTimestamp($tExpire), 'wpsg_mod_abo_duration', Array('class_content_wrap' => (($tExpire > time())?'wpsg_mod_abo_future_expire':'wpsg_mod_abo_expired'))); ?>
+
+ <script>
+
+ moment.locale('de');
+
+ jQuery('#wpsg_mod_abo_duration').editable({
+ type: 'combodate',
+ success: function(response, newValue) {
+
+ jQuery.ajax({
+ url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_abo&subaction=admin_inlineEdit&noheader=1',
+ data: {
+ field: 'duration',
+ product_key: '<?php echo $oOrderProduct->getProductKey(); ?>',
+ order_id: '<?php echo $view['oOrder']->getId() ?>',
+ date: newValue.format()
+ },
+ success: function(response) {
+
+ }
+ })
+
+ },
+ format: 'DD.MM.YYYY HH:mm:ss',
+ viewformat: 'DD.MM.YYYY HH:mm:ss',
+ template: 'D MMM YYYY HH:mm:ss',
+ combodate: {
+ minYear: 2000,
+ maxYear: <?php echo (intval(date('Y')) + 1); ?>,
+ minuteStep: 1
+ }
+ });
+
+ </script>
<?php echo wpsg_drawForm_Text(wpsg_translate(__('Preis (#1# Tage):', 'wpsg'), $oOrderProduct->getProduct()->wpsg_mod_abo_durration), wpsg_ff($oOrderProduct->getProduct()->wpsg_mod_abo_price, $this->get_option('wpsg_currency'))); ?>
|
