20 lines
852 B
PHP
20 lines
852 B
PHP
<?php if ($sf_user->getParameter('mode', null, 'soteshop/stAdminGenerator/stProduct/list/config') == 'edit'): ?>
|
|
<?php echo input_tag('product['.$product->getId().'][weight]', stPrice::round($product->getWeight()), array('style' => 'width: 60px')); ?>
|
|
<script type="text/javascript">
|
|
jQuery(function($) {
|
|
var field = $('#product_<?php echo $product->getId() ?>_weight');
|
|
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 else: ?>
|
|
<?php echo stPrice::round($product->getWeight()) ?>
|
|
<?php endif ?>
|