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

    <div class="box-footer">
        {!! Form::submit($submit_text, ['class'=>'btn btn-success', 'name' => 'save']) !!}
        {!! 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