@if($read_only)
@component('admin.components.info') Once a PIREP has been accepted/rejected, certain fields go into read-only mode. @endcomponent
@endif
{{ Form::label('flight_number', 'Flight Number/Route Code/Leg') }} @if($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' => $read_only ]) }}

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

Filed Via:

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

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

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

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

@endif
{{ Form::label('aircraft_id', 'Aircraft:') }} @if($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' => $read_only ]) }}

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

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

{{ $pirep->dpt_airport->id }} - {{ $pirep->dpt_airport->name }}

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

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

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

{{ $pirep->arr_airport->id }} - {{ $pirep->arr_airport->name }}

{{ 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($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' => $read_only]) }}
{{ Form::number('minutes', null, [ 'class' => 'form-control', 'placeholder' => 'minutes', 'readonly' => $read_only]) }}

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

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

@endif
{{ 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

{{-- You don't want to change this ID unless you don't want the fares form to work :) --}}
@include('admin.pireps.fares')
{{-- CUSTOM FIELDS --}}

field values

{{-- 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