<style>
    #tabs label{
        margin-top: 10px;
    }
</style>
<div class="row" id="tabs">
    <div class="tab-content">
        <div id="home" class="tab-pane fade in active">
            <div class="col-sm-12">
                <div class="master-form">
                    <div class="title-note">
                        <h3>
                            <span class="fa fa-exclamation-triangle"></span> {{__('administrator.new_product')}}
                            <i>({{__('administrator.fields_in_red_are_required')}})</i></h3>
                    </div>
                    <div class="form-group col-sm-12 col-xs-12">
                        <div class="col-sm-2 col-xs-12 ">
                            <label class="required">{{__('administrator.item_name')}} </label>
                        </div>
                        <div class="col-sm-10 col-xs-12">
                            {!! Form::text('product_name', null, array('placeholder' => __('administrator.item_name'),'class' => 'form-control input-sm','maxlength'=>'50')) !!}
                        </div>
                    </div>
                    <div class="form-group col-sm-12 col-xs-12">
                        <div class="col-sm-2 col-xs-12 ">
                            <label class="required">{{__('administrator.color')}} </label>
                        </div>
                        <div class="col-sm-10 col-xs-12">
                            {!! Form::select('color_code',getColor()->pluck('name','code'), null, array('placeholder' => __('administrator.please_select'),'class' => 'form-control select2')) !!}
                        </div>
                    </div>
                    <div class="form-group col-sm-12 col-xs-12">
                        <div class="col-sm-2 col-xs-12 ">
                            <label class="required">{{__('administrator.barcode')}} </label>
                        </div>
                        <div class="col-sm-10 col-xs-12">
                            {!! Form::text('barcode', @$code, array('placeholder' => __('administrator.barcode'),'class' => 'form-control input-sm','maxlength'=>'50')) !!}
                        </div>
                    </div>
                    <div class="form-group col-sm-12 col-xs-12">
                        <div class="col-sm-2 col-xs-12 ">
                            <label class="required">{{__('administrator.category')}}</label>
                        </div>
                        <div class="col-sm-10 paddin-0">
                            <div class="col-sm-12">
                                <div class="input-group">
                                    {!! Form::select('category_id', $category, null, ['placeholder' => __('administrator.please_select'),'class' => 'form-control select2','id'=>'category_id']) !!}
                                    <span class="input-group-addon cursor getHtmlForm"
                                          data-full_name="{{__('administrator.create').' '.__('administrator.category')}}"
                                          data-href="{{route('category.create')}}?input_name=category_id&type=product">
                                            <span class="fa fa-plus"></span>
                                        </span>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="form-group col-sm-12 col-xs-12">
                        <div class="col-sm-2 col-xs-12 ">
                            <label class="required">{{__('administrator.unit')}}</label>
                        </div>
                        <div class="col-sm-10 paddin-0">
                            <div class="col-sm-12">
                                <div class="input-group">
                                    {!! Form::select('unit_id', $unit, null, ['placeholder' => __('administrator.please_select'),'class' => 'form-control select2','id'=>'unit_id']) !!}
                                    <span class="input-group-addon cursor getHtmlForm"
                                          data-full_name="{{__('administrator.create').' '.__('administrator.unit')}}"
                                          data-href="{{route('unit.create')}}?input_name=unit_id&type=product">
                                            <span class="fa fa-plus"></span>
                                        </span>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="form-group col-sm-12 col-xs-12">
                        <div class="col-sm-2 col-xs-12 ">
                            <label class="required">{{__('administrator.sub_unit')}}</label>
                        </div>
                        <div class="col-sm-10 paddin-0">
                            <div class="col-sm-12">
                                <div class="input-group">
                                    {!! Form::select('child_unit', $unit, null, ['placeholder' => __('administrator.please_select'),'class' => 'form-control select2','id'=>'sub_unit']) !!}
                                    <span class="input-group-addon cursor getHtmlForm"
                                          data-full_name="{{__('administrator.create').' '.__('administrator.unit')}}"
                                          data-href="{{route('unit.create')}}?input_name=child_unit&type=product">
                                            <span class="fa fa-plus"></span>
                                        </span>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="form-group col-sm-12 col-xs-12">
                        <div class="col-sm-2 col-xs-12 ">
                            <label class="required">{{__('administrator.cost_riel')}}</label>
                        </div>
                        <div class="col-sm-10 paddin-0">
                            <div class="col-sm-12">
                                {!! Form::text('cost_riel',null, ['placeholder' => __('administrator.cost_riel'),'class' => 'form-control']) !!}
                            </div>
                        </div>
                    </div>
                    <div class="form-group col-sm-12 col-xs-12">
                        <div class="col-sm-2 col-xs-12 ">
                            <label class="required">{{__('administrator.cost_usd')}}</label>
                        </div>
                        <div class="col-sm-10 paddin-0">
                            <div class="col-sm-12">
                                {!! Form::text('cost_usd',null, ['placeholder' => __('administrator.cost_usd'),'class' => 'form-control']) !!}
                            </div>
                        </div>
                    </div>
                    <div class="col-sm-10 col-sm-offset-2">
                        <div class="form-group" id="drop-area">
                            <input id="file-1" type="file" name="gallery" class="file" data-overwrite-initial="false">
                        </div>
                    </div>
                    <div class="col-sm-12 col-xs-12 ">
                        <div class="form-group footer-save">
                            <button type="submit" class=" button_primary pull-right"><span
                                    class="fa fa-save"></span> {{__('administrator.save')}}</button>
                            <button type="button" onClick="history.go(-1)"
                                    class=" button_warning pull-right">
                                <span class=" fa fa-arrow-circle-left"></span> {{__('administrator.back')}}
                            </button>
                        </div>
                    </div>
                </div>
            </div>

        </div>
    </div>
</div>

@section('script')
    <script type="text/javascript">

        $(document).ready(function () {

        });

    </script>
@endsection
