diff options
Diffstat (limited to 'views/order/index.phtml')
| -rw-r--r-- | views/order/index.phtml | 73 |
1 files changed, 70 insertions, 3 deletions
diff --git a/views/order/index.phtml b/views/order/index.phtml index aca2971..49c401e 100644 --- a/views/order/index.phtml +++ b/views/order/index.phtml @@ -23,6 +23,7 @@ <?php foreach ($this->view['tabs']['left'] as $k => $tab) { ?>
<li role="presentation" class="wpsg-order-tab-a wpsg-order-tab-mods" id="wpsg-order-tab-<?php echo $k; ?>"><a href="#" onclick="return false;"><span class="<?php echo $tab['tab_icon']; ?>"></span><?php echo $tab['tab_title']; ?></a></li>
<?php } ?>
+ <li role="presentation" class="wpsg-order-tab-a wpsg-order-tab-mods" id="wpsg-order-tab-add"><a href="#" onclick="return false;"><span class="glyphicon glyphicon-plus"></span><?php echo __("Neue Bestellung", "wpsg"); ?></a></li>
</ul>
<ul class="nav navbar-nav navbar-right">
<?php foreach ($this->view['tabs']['right'] as $k => $tab) { ?>
@@ -101,6 +102,70 @@ <div class="wpsg-order-tab-mods-content wpsg-filter-tab wpsg-order-tab-<?php echo $k ?>" style="display:none;"><?php echo $tab['tab_content']; ?></div>
<?php } ?>
<?php } ?>
+
+ <div class="wpsg-order-tab-add-content wpsg-order-tab-add" style="display:none;">
+
+ <div class="container-fluid form-horizontal">
+ <div class="row">
+ <div class="col-lg-4">
+
+ <form method="POST" id="add_form" action="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&subaction=add&noheader=1">
+
+ <?php echo wp_nonce_field('order-index-add'); ?>
+
+ <br />
+
+ <?php echo wpsg_drawForm_Input('search_customer',__('Kunde (E-Mail oder Kundennummer', 'wpsg'), @$_REQUEST['search_customer']); ?>
+
+ <br />
+
+ <?php $arShippingSelect = []; foreach ($this->arShipping as $shipping_id => $shipping) $arShippingSelect[$shipping_id] = $shipping['name']; ?>
+ <?php echo wpsg_drawForm_Select('add_shipping', __('Versandart', 'wpsg'), $arShippingSelect, @$_REQUEST['add_shipping']); ?>
+
+ <?php $arPaymentSelect = []; foreach ($this->arPayment as $payment_id => $payment) $arPaymentSelect[$payment_id] = $payment['name']; ?>
+ <?php echo wpsg_drawForm_Select('add_payment', __('Zahlungsart', 'wpsg'), $arPaymentSelect, @$_REQUEST['add_payment']); ?>
+
+ <br /><?php echo wpsg_drawForm_SubmitButton(__('Bestellung anlegen')); ?><br />
+
+ <script>
+
+ jQuery(document).ready(function() {
+
+ jQuery('#search_customer').autocomplete( {
+ source: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&subaction=autocomplete&noheader=1',
+ minLength: 2,
+ select: function(event, ui) {
+
+ jQuery('#search_customer').val(ui.item.id);
+
+ return false;
+
+ }
+ } );
+
+ jQuery('#add_form').on('submit', function() {
+
+ if (jQuery.trim(jQuery('#search_customer').val()) === '') {
+
+ alert('<?php echo __('Bitte einen Kunden angeben.', 'wpsg'); ?>');
+
+ return false;
+
+ }
+
+ } );
+
+ } );
+
+ </script>
+
+ </form>
+
+ </div>
+ </div>
+ </div>
+
+ </div>
</nav>
@@ -359,15 +424,17 @@ {
jQuery(this).removeClass('active');
- jQuery('.' + jQuery(this).attr("id")).slideUp(250);
-
+ jQuery('.' + jQuery(this).attr("id")).slideUp(250);
+
}
else
{
-
+
jQuery(this).addClass('active');
jQuery('.' + jQuery(this).attr("id")).slideDown(250);
+ if (jQuery(this).attr("id") === 'wpsg-order-tab-add') jQuery('#search_customer').focus();
+
}
return false;
|
