@if (isset($product)) {!! Form::model($product, ['url' => $type . '/' . $product->id, 'method' => 'put', 'files'=> true, 'id'=> 'product']) !!} @else {!! Form::open(['url' => $type, 'method' => 'post', 'files'=> true, 'id'=> 'product']) !!} @endif
{!! Form::label('product_image_file', trans('product.product_image'), ['class' => 'control-label']) !!}
@if(isset($product->product_image) && $product->product_image!="") Image @endif
{{trans('dashboard.select_image')}} {{trans('dashboard.change')}} {{trans('dashboard.remove')}}
{{ $errors->first('product_image_file', ':message') }}
{!! Form::label('product_name', trans('product.product_name'), ['class' => 'control-label required']) !!}
{!! Form::text('product_name', null, ['class' => 'form-control','placeholder' => 'Product name']) !!} {{ $errors->first('product_name', ':message') }}
{!! Form::label('category_id', trans('product.category_id'), ['class' => 'control-label required']) !!}
{!! Form::select('category_id', $categories, null, ['id'=>'category_id','class' => 'form-control']) !!} {{ $errors->first('category_id', ':message') }}
{!! Form::label('product_type', trans('product.product_type'), ['class' => 'control-label required']) !!}
{!! Form::select('product_type', $product_types, (isset($product)?$product->product_type:null), ['id'=>'product_type','class' => 'form-control']) !!} {{ $errors->first('product_type', ':message') }}
{!! Form::label('status', trans('product.status'), ['class' => 'control-label required']) !!}
{!! Form::select('status', $statuses, (isset($product)?$product->status:null), ['id'=>'status','class' => 'form-control']) !!} {{ $errors->first('status', ':message') }}
{!! Form::label('quantity_on_hand', trans('product.quantity_on_hand'), ['class' => 'control-label required']) !!}
{!! Form::input('number','quantity_on_hand', null, ['class' => 'form-control', 'min'=>0]) !!} {{ $errors->first('quantity_on_hand', ':message') }}
{!! Form::label('quantity_available', trans('product.quantity_available'), ['class' => 'control-label required']) !!}
{!! Form::input('number','quantity_available', null, ['class' => 'form-control', 'min'=>0]) !!} {{ $errors->first('quantity_available', ':message') }}
{!! Form::label('description', trans('product.description'), ['class' => 'control-label']) !!}
{!! Form::textarea('description', null, ['class' => 'form-control resize_vertical', 'placeholder' => 'Product Information']) !!} {{ $errors->first('description', ':message') }}
{!! Form::label('sale_price', trans('product.sale_price'), ['class' => 'control-label required']) !!}
{!! Form::text('sale_price', null, ['class' => 'form-control']) !!} {{ $errors->first('sale_price', ':message') }}
{{trans('table.back')}}
{!! Form::close() !!}
@section('scripts') @endsection