{{ 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="title">Titolo:</label>
                    <input type="text" name="title" class="form-control title" maxlength="150" value="{{ old('title') }}">
                </div>                
            </div>
            <div class="col-md-6">
                <div class="form-group">
                    <label for="date">Data:</label>
                    <input type="text" name="date" class="form-control" value="{{ old('date', isset($breaking_news) ? null : date("d/m/Y H:i")) }}">
                </div>                
            </div>     
        </div>
       
        <div class="row">
            <div class="col-md-6">
                <div class="form-group">
                    <label for="online">Online:</label><br>
                    <input type="checkbox" name="online" value="on" {{ old('online') ? 'checked' : '' }}>
                </div>                
            </div>
        </div>
    </div>

    <div class="box-footer">
        <button type="submit" class="btn btn-success" name="save">{{ $submit_text }}</button>
        {!! link_to_route('breaking_news.index', 'Annulla', null, array('class' => 'btn btn-info')) !!}
    </div>
</div>

@section('extra_js')

    <script src="/backend/plugins/input-mask/jquery.inputmask.js"></script>
    <script src="/backend/plugins/input-mask/jquery.inputmask.date.extensions.js"></script>
    <script src="/backend/plugins/input-mask/jquery.inputmask.extensions.js"></script>

    <script src="/backend/plugins/moment/moment.min.js"></script>
    <script src="/backend/plugins/daterangepicker/daterangepicker.js"></script>

    <script>
        $(function () {

            $("[name='date']").daterangepicker({ singleDatePicker: true, timePicker: true, timePicker24Hour: true, locale: { format: 'DD/MM/YYYY HH:mm' }})

        });
    </script>

@stop