<div class="panel panel-default">
    <div class="panel-heading">
        <h4>Datos Personales</h4>
    </div>
    <div class="panel-body">

<div class="form-group{{ $errors->has('user_id') ? ' has-error' : '' }}">
	{!! Form::label('user_id', trans('general.usuario')) !!}

	{!! Form::select('user_id', $users, null, ['class' => 'form-control']) !!}

	@if ($errors->has('user_id'))
		<span class="help-block">
			<strong>{{ $errors->first('user_id') }}</strong>
		</span>
	@endif
</div>
 </div>
</div>


<div class="panel panel-default">
    <div class="panel-heading">
        <h4>Datos Reserva</h4>
    </div>
    <div class="panel-body">

		<div class="form-group{{ $errors->has('reference_number') ? ' has-error' : '' }}">
			{!! Form::label('reference_number',trans('general.reservationsnumber') ) !!}
			@if(isset($reference_number))
				{{--$reference_number --}}
			@else {{$reference_number = null}}
			@endif

			{!! Form::text('reference_number',$reference_number, ['class' => 'form-control','readonly']) !!}
			@if ($errors->has('reference_number'))
				<span class="help-block">
			<strong>{{ $errors->first('reference_number') }}</strong>
		</span>
			@endif
		</div>



<div class="form-group{{ $errors->has('boat') || $errors->has('boat') ? ' has-error' : '' }}">
        	{!! Form::label('boat',  trans('general.boat')) !!}<br />
        	{!! Form::select('boat_id', $boat, null, ['class' => 'form-control boat']) !!}

	@if ($errors->has('boat'))
		<span class="help-block">
			<strong>{{ $errors->first('boat') }}</strong>
		</span>
	@endif
</div>

<div class="form-group{{ $errors->has('schedule_id') || $errors->has('schedule_id') ? ' has-error' : '' }}">
        	{!! Form::label('schedule_id',  trans('general.schedule')) !!}<br />
        	{!! Form::select('schedule_id', $schedule, null, ['class' => 'form-control schedule']) !!}

	@if ($errors->has('schedule_id'))
		<span class="help-block">
			<strong>{{ $errors->first('schedule_id') }}</strong>
		</span>
	@endif
</div>

<div class="form-group{{ $errors->has('date_start') ? ' has-error' : '' }}">
	{!! Form::label('date_start', trans('general.date_start')) !!}
	<div class="input-group">
		<div class="input-group-addon">
		<i class="fa fa-calendar" title="click sobre el campo de texto para que aparezca el calendario"></i>
		</div>
		{!! Form::text('date_start', null, ['class' => 'form-control date_start']) !!}

	</div>
	@if ($errors->has('date_start'))
		<span class="help-block">
			<strong>{{ $errors->first('date_start') }}</strong>
		</span>
	@endif
</div>

 </div>
</div>


@if(Auth::user()->role->layout == 1)
<div class="panel panel-default">
    <div class="panel-heading">
        <h4>Estado</h4>
    </div>
    <div class="panel-body">

 <div class="form-group">

 @if(isset($status))
				@foreach($status as $estado)
				@if($estado->id == 1)
				<span class="label label-success"> {{$estado->name}}</span>
				{!! Form::radio('status_id', '1') !!}

				@elseif($estado->id == 2)
				<span class="label label-warning">  {{$estado->name}}</span>
				{!! Form::radio('status_id', '2', true) !!}

				@elseif($estado->id == 4)
				<span class="label label-info">  {{$estado->name}}</span>
				{!! Form::radio('status_id', '4') !!}

				@elseif($estado->id == 3)
				<span class="label label-danger">  {{$estado->name}}</span>
				{!! Form::radio('status_id', '3') !!}

				@endif
				@endforeach
				@endif

</div>

 </div>
</div>
@else
{!! Form::hidden ('status_id',2) !!}
@endif

<div class="form-group{{ $errors->has('comments') ? ' has-error' : '' }}">
	{!! Form::label('comments', trans('general.comment')) !!}
	{!! Form::textarea('comments', null, ['class' => 'form-control','rows' => '3']) !!}
	@if ($errors->has('comments'))
		<span class="help-block">
			<strong>{{ $errors->first('comments') }}</strong>
		</span>
	@endif
</div>


<div class="pull-right">
	{!! Form::submit(trans('general.save'), ['class' => 'btn btn-success btn-flat']) !!}
	<a href="{{ asset('/reservations') }}" type="button" class="btn btn-default btn-flat">{{trans('general.cancel')}}</a>
</div>
