{{ 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">
                    <label for="name">Nome:</label>
                    <input type="text" name="name" class="form-control title" value="{{ old('name') }}">
                </div>
            </div>
        </div>

        <div class="row">
            <div class="col-md-6">
                <div class="form-group">
                    <label for="url">Url sponsor:</label>
                    <input type="text" name="url" class="form-control title" value="{{ old('url') }}">
                </div>
            </div>
            <div class="col-md-6">
                <div class="form-group">
                    <label for="image">Banner pubblicitario:</label>
                    <div class="custom-file-upload"><input type="file" name="image" 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)
            <button type="submit" class="btn btn-success">{{ $submit_text }}</button>
        @endif
        {!! link_to_route('categories.groups.index', 'Annulla', $category, array('class' => 'btn btn-info')) !!}
    </div>
</div>

@section('extra_js')

    <script>

        $(function () {



        });

    </script>
@stop
