@if(!empty($pirep) && $pirep->read_only)
@component('admin.components.info') Once a PIREP has been accepted/rejected, certain fields go into read-only mode. @endcomponent
@endif
 Flight Information
{{ Form::label('flight_number', 'Flight Number/Route Code/Leg') }} @if($pirep->read_only)

{{ $pirep->ident }} {{ Form::hidden('flight_number') }} {{ Form::hidden('flight_code') }} {{ Form::hidden('flight_leg') }}

@else
{{ Form::text('flight_number', null, [ 'placeholder' => 'Flight Number', 'class' => 'form-control']) }}

{{ $errors->first('flight_number') }}

{{ Form::text('route_code', null, [ 'placeholder' => 'Code (optional)', 'class' => 'form-control']) }}

{{ $errors->first('route_code') }}

{{ Form::text('route_leg', null, [ 'placeholder' => 'Leg (optional)', 'class' => 'form-control']) }}

{{ $errors->first('route_leg') }}

@endif
{{ Form::label('flight_type', 'Flight Type') }} {{ Form::select('flight_type', \App\Models\Enums\FlightType::select(), null, [ 'class' => 'form-control select2', 'readonly' => $pirep->read_only ]) }}

{{ $errors->first('flight_type') }}

Filed Via:

{{ PirepSource::label($pirep->source) }} @if(filled($pirep->source_name)) ({{ $pirep->source_name }}) @endif
 Flight Information
{{ Form::label('airline_id', 'Airline') }} @if($pirep->read_only)

{{ $pirep->airline->name }}

{{ Form::hidden('airline_id') }} @else {{ Form::select('airline_id', $airlines_list, null, [ 'class' => 'form-control select2', 'readonly' => $pirep->read_only]) }}

{{ $errors->first('airline_id') }}

@endif
{{ Form::label('aircraft_id', 'Aircraft:') }} @if($pirep->read_only)

{{ $pirep->aircraft->name }}

{{ Form::hidden('aircraft_id') }} @else {{ Form::select('aircraft_id', $aircraft_list, null, [ 'id' => 'aircraft_select', 'class' => 'form-control select2', 'readonly' => $pirep->read_only ]) }}

{{ $errors->first('aircraft_id') }}

@endif
{{ Form::label('dpt_airport_id', 'Departure Airport:') }} @if($pirep->read_only)

{{ $pirep->dpt_airport_id }}@if($pirep->dpt_airport->name) - {{ $pirep->dpt_airport->name }}@endif

{{ Form::hidden('dpt_airport_id') }} @else {{ Form::select('dpt_airport_id', $airports_list, null, [ 'class' => 'form-control select2', 'readonly' => $pirep->read_only]) }}

{{ $errors->first('dpt_airport_id') }}

@endif
{{ Form::label('arr_airport_id', 'Arrival Airport:') }} @if($pirep->read_only)

{{ $pirep->arr_airport->id }}@if($pirep->arr_airport->name) - {{ $pirep->arr_airport->name }}@endif

{{ Form::hidden('arr_airport_id') }} @else {{ Form::select('arr_airport_id', $airports_list, null, ['class' => 'form-control select2']) }}

{{ $errors->first('arr_airport_id') }}

@endif
{{ Form::label('flight_time', 'Flight Time (hours & minutes):') }} @if($pirep->read_only)

{{ $pirep->hours }} hours, {{ $pirep->minutes }} minutes {{ Form::hidden('hours') }} {{ Form::hidden('minutes') }}

@else
{{ Form::number('hours', null, [ 'class' => 'form-control', 'placeholder' => 'hours', 'readonly' => $pirep->read_only]) }}
{{ Form::number('minutes', null, [ 'class' => 'form-control', 'placeholder' => 'minutes', 'readonly' => $pirep->read_only]) }}

{{ $errors->first('hours') }}

{{ $errors->first('minutes') }}

@endif
{{ Form::label('block_fuel', 'Block Fuel:') }}
{{ Form::number('block_fuel', null, [ 'class' => 'form-control', 'min' => 0, 'step' => '0.01', ]) }}

{{ $errors->first('block_fuel') }}

{{ Form::label('fuel_used', 'Fuel Used:') }}
{{ Form::number('fuel_used', null, [ 'class' => 'form-control', 'min' => 0, 'step' => '0.01' ]) }}

{{ $errors->first('fuel_used') }}

{{ Form::label('level', 'Flight Level:') }}
{{ Form::number('level', null, ['class' => 'form-control', 'min' => 0]) }}

{{ $errors->first('level') }}

{{ Form::label('route', 'Route:') }} {{ Form::textarea('route', null, ['class' => 'form-control']) }}

{{ $errors->first('route') }}

{{ Form::label('notes', 'Notes:') }} {{ Form::textarea('notes', null, ['class' => 'form-control']) }}

{{ $errors->first('notes') }}

{{-- FARES --}}
 fares
@include('admin.pireps.fares')
{{-- CUSTOM FIELDS --}}
 fields
{{-- You don't want to change this ID unless you don't want the fares form to work :) --}} @include('admin.pireps.field_values')
{{ Form::button('Save', ['type' => 'submit', 'class' => 'btn btn-success']) }} Cancel