{{ csrf_field() }}
<div class="box box-primary">
    <div class="box-header with-border">
        <h3 class="box-title"></h3>
    </div>

    <div class="box-body">
        <div class="row">
            <div class="col-md-6">
                <div class="form-group">
                    {!! Form::label('name', 'Nome:') !!}
                    {!! Form::text('name', null, array('class' => 'form-control title')) !!}
                </div>
            </div>
        </div>

        <div class="row">
            <div class="col-md-6">
                <div class="form-group">
                    {!! Form::label('url', 'Url sponsor:') !!}
                    {!! Form::text('url', null, array('class' => 'form-control title')) !!}
                </div>
            </div>
            <div class="col-md-6">
                <div class="form-group">
                    {!! Form::label('image', 'Banner pubblicitario:') !!}
                    <div class="custom-file-upload">{!! Form::file('image', null, array('class' => 'form-control')) !!}</div>
                    @if (isset($category) && $category->image != '')
                        <br><img src="/files/categories/{{$category->image}}" style="max-width:250px" />
                    @endif
                </div>
            </div>
        </div>

    </div>

    <div class="box-footer">
        @if(Auth::user()->only_read == false)
            {!! Form::submit($submit_text, ['class'=>'btn btn-success']) !!}
        @endif
        {!! link_to_route('categories.groups.index', 'Annulla', $category, array('class' => 'btn btn-info')) !!}
    </div>
</div>

@section('extra_js')

    <script>

        $(function () {



        });

    </script>
@stop
