33 lines
1.3 KiB
PHP
33 lines
1.3 KiB
PHP
<?php if ($sf_user->getParameter('mode', null, 'soteshop/stAdminGenerator/stProduct/list/config') == 'edit'): ?>
|
|
<?php if ($product->getOptHasOptions() > 1 && $product->hasStockManagmentWithOptions()): ?>
|
|
<?php echo st_link_to(__('Edytuj', null, 'stProduct'), 'stProduct/optionsStockList?id='.$product->getId()) ?>
|
|
<?php else: ?>
|
|
<?php echo input_tag('product['.$product->getId().'][stock]', stPrice::round($product->getStock()), array('style' => 'width: 60px')); ?>
|
|
<script type="text/javascript">
|
|
jQuery(function($) {
|
|
var field = $('#product_<?php echo $product->getId() ?>_stock');
|
|
field.change(function() {
|
|
this.value = stPrice.fixNumberFormat(this.value);
|
|
});
|
|
|
|
field.keypress(function(event) {
|
|
if (event.keyCode == Event.KEY_RETURN)
|
|
{
|
|
this.value = stPrice.fixNumberFormat(this.value);
|
|
}
|
|
});
|
|
});
|
|
</script>
|
|
<?php endif ?>
|
|
<?php else: ?>
|
|
<?php echo stPrice::round($product->getStock()) ?>
|
|
<?php endif ?>
|
|
|
|
|
|
<style type="text/css">
|
|
#st_record_list th:nth-of-type(10), #st_record_list th:nth-of-type(11), #st_record_list td:nth-of-type(12), #st_record_list td:nth-of-type(13){
|
|
display: none;
|
|
}
|
|
|
|
|
|
</style>
|