diff --git a/admin-dev/themes/template/orders/view.tpl b/admin-dev/themes/template/orders/view.tpl index ce997c35e..cf67b1008 100755 --- a/admin-dev/themes/template/orders/view.tpl +++ b/admin-dev/themes/template/orders/view.tpl @@ -47,6 +47,13 @@ var txt_add_product_no_product_quantity = "{l s='Error: Quantity of product must be set'}"; var txt_add_product_no_product_price = "{l s='Error: Price of product must be set'}"; var txt_confirm = "{l s='Are you sure?'}"; + + var statesShipped = new Array(); + {foreach from=$states item=state} + {if (!$currentState->shipped && $state['shipped'])} + statesShipped.push({$state['id_order_state']}); + {/if} + {/foreach} {literal} function showWarehouseList() @@ -68,6 +75,16 @@ nextText: '', dateFormat: 'yy-mm-dd' }); + $('#id_order_state').change(function() { + if ($.inArray(parseInt($(this).val()), statesShipped) >= 0) + { + showWarehouseList(); + } + else + { + hideWarehouseList(); + } + }); }); {/literal} @@ -108,9 +125,9 @@
- {foreach from=$states item=state} - + {/foreach}