diff options
Diffstat (limited to 'views/order/index.phtml')
| -rw-r--r-- | views/order/index.phtml | 46 |
1 files changed, 43 insertions, 3 deletions
diff --git a/views/order/index.phtml b/views/order/index.phtml index da8a62e..74f6c5b 100644 --- a/views/order/index.phtml +++ b/views/order/index.phtml @@ -235,7 +235,7 @@ <div class="wpsg_clear"></div>
<div class="content">
- <form method="post" action="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&noheader=1" enctype="multipart/form-data">
+ <form method="post" action="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&noheader=1" enctype="multipart/form-data" id="order_form">
<?php if (is_array($this->view['arData']) && sizeof($this->view['arData']) > 0) { ?>
@@ -451,7 +451,7 @@ let el_customer_inform = document.getElementById('customer_inform');
document.getElementById('wpsg_action').addEventListener('change', (event) => {
-
+
if (parseInt(event.target.value) >= 0) {
el_customer_inform.style.display = 'inline-block';
@@ -462,6 +462,18 @@ }
+ let el_doaction = document.getElementById('doaction');
+
+ if (event.target.value === 'writeMultiRechnung') {
+
+ el_doaction.style.display = 'none';
+
+ } else {
+
+ el_doaction.style.display = 'block';
+
+ }
+
});
</script>
@@ -484,6 +496,34 @@ <br />
<label for="invoice_date"><?php echo __('Rechnungsdatum', 'wpsg') ;?></label>
<input type="date" value="<?php echo date('Y-m-d'); ?>" name="wpsg_Multirechnung_datum" id="invoice_date" />
+
+ <br />
+
+ <input type="hidden" name="preview" id="wpsg_mod_rechnungen_preview" />
+
+ <input type="submit" name="wpsg_order_doaction" value="<?php echo _('Vorschau'); ?>" id="wpsg_mod_rechnungen_button_preview" />
+ <input type="submit" name="wpsg_order_doaction" value="<?php echo _('Erstellen'); ?>" id="wpsg_mod_rechnungen_button_submit" />
+
+ <script>
+
+ let el_order_form = document.getElementById('order_form');
+
+ document.getElementById('wpsg_mod_rechnungen_button_preview').addEventListener('click', () => {
+
+ el_order_form.setAttribute('target', '_blank');
+ document.getElementById('wpsg_mod_rechnungen_preview').value = '1';
+
+ } );
+
+ document.getElementById('wpsg_mod_rechnungen_button_submit').addEventListener('click', () => {
+
+ el_order_form.setAttribute('target', '');
+ document.getElementById('wpsg_mod_rechnungen_preview').value = '0';
+
+ } );
+
+ </script>
+
</div>
<script>
@@ -503,7 +543,7 @@ }
});
-
+
</script>
</div>
|
