summaryrefslogtreecommitdiff
path: root/views/mods/mod_abo/order_view.phtml
diff options
context:
space:
mode:
Diffstat (limited to 'views/mods/mod_abo/order_view.phtml')
-rw-r--r--views/mods/mod_abo/order_view.phtml25
1 files changed, 22 insertions, 3 deletions
diff --git a/views/mods/mod_abo/order_view.phtml b/views/mods/mod_abo/order_view.phtml
index 8ae6340..52ea434 100644
--- a/views/mods/mod_abo/order_view.phtml
+++ b/views/mods/mod_abo/order_view.phtml
@@ -8,12 +8,16 @@
?>
-<?php foreach ($this->view['arOrderedAboProducts'] as $oOrderProduct) { ?>
+<?php foreach ($this->view['arOrderedAboProducts'] as $oOrderProduct) {
+
+ $oAbo = wpsg_abo::getFromOrderAndProduct($view['oOrder']->getId(), $oOrderProduct->getId());
+
+ ?>
<?php echo wpsg_drawForm_AdminboxStart($oOrderProduct->getProduct()->getProductName()); ?>
<?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'))); ?>
+ <?php echo wpsg_drawForm_Text(__('Laufzeit', 'wpsg'), wpsg_formatTimestamp($tExpire), 'wpsg_mod_abo_duration', Array('class_content_wrap' => 'wpsg_abo_state wpsg_abo_state_class_'.$oAbo->getState())); ?>
<script>
@@ -21,6 +25,11 @@
jQuery('#wpsg_mod_abo_duration').editable({
type: 'combodate',
+ display: function(value) {
+
+ jQuery(this).html(value.format('DD.MM.YYYY HH:mm:ss'));
+
+ },
success: function(response, newValue) {
jQuery.ajax({
@@ -32,7 +41,9 @@
date: newValue.format()
},
success: function(response) {
-
+
+ jQuery('.wpsg_abo_state').attr("class", "col-sm-6 wpsg_abo_state_class_" + response.state)
+
}
})
@@ -50,6 +61,14 @@
</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'))); ?>
+ <?php
+
+ $strURL = $this->callMod('wpsg_mod_abo', 'getRebuyLink', [$view['oOrder']->getId(), $oOrderProduct->getProductKey()]);
+ $strURL = '<a href="'.$strURL.'">'.$strURL.'</a>';
+
+ echo wpsg_drawForm_Text(__('URL für den Kauf einer Verlängerung', 'wpsg'), $strURL);
+
+ ?>
<?php echo wpsg_drawForm_TextStart(); ?>