<div class="row">
    <div class="col-md-12">
        <div class="form-group">
            <?php echo Form::label('name', trans('application.name').'*'); ?>
            <?php echo Form::text('name', null, ['class' => 'form-control input-sm', 'required']); ?>
        </div>
        <div class="form-group">
            <?php echo Form::label('code', trans('application.code').'*'); ?>
            <?php echo Form::text('code', null, ['class' => 'form-control input-sm', 'required']); ?>
        </div>
        <div class="form-group">
            <?php echo Form::label('category_id', trans('application.category')); ?>
            <div class="input-group col-sm-12">
                <?php echo Form::select('category_id',$categories,null, ['class' => 'form-control input-sm chosen']); ?>
                <span class="input-group-addon">
                    <a href="<?php echo e(route('product_category.create')); ?>" data-toggle="ajax-modal"><i class="fa fa-plus"></i></a>
                </span>
            </div>
        </div>
        <div class="form-group">
            <?php echo Form::label('price', trans('application.unit_price').'*'); ?>
            <?php echo Form::input('number','price',null, ['class' => 'form-control input-sm', 'min'=>'0','step'=>'any','required']); ?>
        </div>
        <div class="form-group">
            <?php echo Form::label('product_image', 'Product Image ('.trans('application.width').': 200)'); ?>
            <?php if(isset($product) && $product->image != ''): ?>
                <?php echo HTML::image(asset('assets/img/uploads/product_images/'.$product->image), 'image', array('class' => 'thumbnail')); ?>
            <?php endif; ?>
            <div class=" form-group input-group input-file" style="margin-bottom: 10px;">
                <div class="form-control input-sm"></div>
                <span class="input-group-addon">
                    <a class='btn btn-sm btn-primary' href='javascript:;'>
                        <?php echo e(trans('application.browse')); ?>
                        <input type="file" name="product_image" id="product_image" onchange="$(this).parent().parent().parent().find('.form-control').html($(this).val());">
                    </a>
                </span>
            </div>
        </div>
        <div class="form-group">
            <?php echo Form::label('description', trans('application.product_description')); ?>
            <?php echo Form::textarea('description',null, ['class' => 'form-control input-sm', 'rows'=>5]); ?>
        </div>
    </div>
</div>