{{ 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="penality">Punti di penalità:</label>
                    <input type="text" name="penality" class="form-control" value="{{ old('penality') }}">
                </div>                
            </div>
        </div>
        <div class="row">
            <div class="col-md-6">
                <div class="form-group">
                    <label for="excluded">Esclusa:</label><br>
                    <input type="checkbox" name="excluded" value="on" {{ old('excluded') ? 'checked' : '' }}>
                </div>                
            </div>
            <div class="col-md-3">
                <div class="form-group">
                    <label for="day">Giornata ritiro:</label>
                    <input type="text" name="day" class="form-control" value="{{ old('day') }}">
                </div>                
            </div>
            <div class="col-md-3">
                <div class="form-group">
                    <label>&nbsp;</label>
                    <select class="form-control" name="type">
                        <option value="-"></option>
                        <option value="andata" {{$team->type == 'andata' ? 'selected' : ''}}>Andata</option>
                        <option value="ritorno" {{$team->type == 'ritorno' ? 'selected' : ''}}>Ritorno</option>
                    </select>
                </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('teams.index', 'Annulla', ['type' => Session::get('type') , "category_id" => Session::get('category_id') , "group_id" => Session::get('group_id')], array('class' => 'btn btn-info')) !!}
    </div>
</div>

@section('extra_js')

    <script>
        
    </script>
    
@stop