{{ 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 class="col-md-6">
                <div class="form-group">
                    <label for="type">Tipologia:</label>
                    {{-- TODO: Convert Form::select for type manually --}}
<select name="type" class="form-control">
    {{-- Add options manually --}}
</select>
                </div>
            </div>
        </div>
        <div class="row">
            <div class="col-md-6">
                <div class="form-group">
                    <label for="grp">Raggruppamento:</label>
                    <input type="text" name="grp" class="form-control title" value="{{ old('grp') }}">
                </div>
            </div>
        </div>
        <input name="position" type="hidden" value="{{isset($category) ? $category->position : '0'}}">
    </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.index', 'Annulla', null, array('class' => 'btn btn-info')) !!}
    </div>
</div>
