diff options
Diffstat (limited to 'views/order/index.phtml')
| -rw-r--r-- | views/order/index.phtml | 54 |
1 files changed, 51 insertions, 3 deletions
diff --git a/views/order/index.phtml b/views/order/index.phtml index 681457d..b895aae 100644 --- a/views/order/index.phtml +++ b/views/order/index.phtml @@ -4,6 +4,14 @@ * Template für die Übersicht der Bestellungen
*/
+ $arPaymentKeySelect = [];
+
+ foreach ($this->getPaymentArray() as $payment_key => $payment) {
+
+ $arPaymentKeySelect[$payment_key] = $payment['name'];
+
+ }
+
?>
<div class="wpsg_order" id="wpsg-bs">
@@ -46,6 +54,7 @@ <?php echo wpsg_drawForm_Input('filter[s]', __('Suchfeld', 'wpsg'), wpsg_getStr($this->view['arFilter']['s'])); ?>
<?php echo wpsg_drawForm_Input('filter[k_id]', __('Kunde (ID)', 'wpsg'), wpsg_getStr($this->view['arFilter']['k_id'])); ?>
+ <?php echo wpsg_drawForm_Select('filter[payment_key]', __('Zahlungsart', 'wpsg'), $arPaymentKeySelect, wpsg_getStr($this->view['arFilter']['payment_key'])); ?>
<?php echo wpsg_drawForm_Select('filter[status]', __('Bestellstatus', 'wpsg'), wpsg_array_merge(array('-1' => __('Alle', 'wpsg')), $this->arStatus), @$this->view['arFilter']['status']); ?>
<?php /* if ($this->hasMod('wpsg_mod_produktartikel')) { Vorbereitet aber Joins in wpsg_order nach den wp Ktegorien noch nicht umgesetzt! ?>
@@ -246,7 +255,7 @@ <tr>
<td class="col_checkbox">
- <input class="col_set_checkbox" name="wpsg_multido[<?php echo $oOrder->id; ?>]" type="checkbox" />
+ <input class="col_set_checkbox" data-order_id="<?php echo $oOrder->id; ?>" name="wpsg_multido[<?php echo $oOrder->id; ?>]" type="checkbox" />
</td>
<td class="col_nr">
@@ -417,10 +426,39 @@ <option value="writeRechnung"><?php echo __('Rechnung schreiben', 'wpsg'); ?></option>
<option value="showRechnung"><?php echo __('Rechnung ansehen', 'wpsg'); ?></option>
<?php } ?>
+ <?php if ($this->hasMod('wpsg_mod_kundenkontakt')) { ?>
+ <option value="customercontact"><?php echo __('Kunden informieren', 'wpsg') ;?></option>
+ <?php } ?>
</select>
<input onclick="if (jQuery('#wpsg_action').val() == 'multiDelete') { if (!confirm('<?php echo __('Sind Sie sich sicher?', 'wpsg'); ?>')) return false; }" type="submit" value="<?php echo __('Ausführen', 'wpsg'); ?>" class="button-secondary action" id="doaction" name="wpsg_order_doaction" />
+ <div id="customer_inform" style="display:none;">
+ <label class="mr-4 font-normal">
+ <input class="mt-0 mr-2" type="checkbox" name="inform" value="1" /> <?php echo __('Kunden informieren', 'wpsg'); ?>
+ </label>
+ </div>
+
+ <script>
+
+ 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';
+
+ } else {
+
+ el_customer_inform.style.display = 'none';
+
+ }
+
+ });
+
+ </script>
+
</div>
<div style="margin-right:-15px;">
@@ -441,8 +479,10 @@ <input id="noheader1" type="hidden" name="noheader1" value="1" />
</form>
</div>
+
+ <?php if ($this->hasMod('wpsg_mod_kundenkontakt')) { $this->callMod('wpsg_mod_kundenkontakt', 'order_index_bottom'); } ?>
-<script type="text/javascript">/* <![CDATA[ */
+<script>
<?php if (wpsg_isSizedString($this->view['arFilter']['order']) && wpsg_isSizedString($this->view['arFilter']['ascdesc'])) { ?>
jQuery('th[data-order="<?php echo @$this->view['arFilter']['order']; ?>"]').addClass('wpsg_order_<?php echo strtolower(@$this->view['arFilter']['ascdesc']); ?>');
@@ -518,5 +558,13 @@ } );
} );
+
+ <?php if ($this->hasMod('wpsg_mod_kundenkontakt')) { ?>
+ document.getElementById('wpsg_action').addEventListener('click', (event) => {
+
+ console.log('OK');
+
+ });
+ <?php } ?>
-/* <