PIREP form styling and improvments
This commit is contained in:
@@ -63,8 +63,8 @@ $(document).ready(function() {
|
||||
});
|
||||
|
||||
$(document).on('pjax:complete', function () {
|
||||
$(".select2").select2();
|
||||
setEditable();
|
||||
initPlugins();
|
||||
setEditable();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
@@ -122,7 +122,7 @@ $(document).ready(function() {
|
||||
});
|
||||
|
||||
$(document).on('pjax:complete', function () {
|
||||
$(".select2").select2();
|
||||
initPlugins();
|
||||
setEditable();
|
||||
});
|
||||
});
|
||||
|
||||
@@ -136,14 +136,20 @@ const removeItem = function (obj, item) {
|
||||
return obj;
|
||||
};
|
||||
|
||||
/**
|
||||
* Initialize any plugins on the page
|
||||
*/
|
||||
const initPlugins = () => {
|
||||
$('.select2').select2({width: 'resolve'});
|
||||
$('input').iCheck({
|
||||
checkboxClass: 'icheckbox_square-blue',
|
||||
radioClass: 'icheckbox_square-blue'
|
||||
});
|
||||
};
|
||||
|
||||
$(document).ready(function () {
|
||||
|
||||
$('.select2').select2();
|
||||
|
||||
$('input').iCheck({
|
||||
checkboxClass: 'icheckbox_square-blue',
|
||||
radioClass: 'icheckbox_square-blue'
|
||||
});
|
||||
initPlugins();
|
||||
|
||||
let storage = getStorage('phpvms.admin');
|
||||
|
||||
|
||||
@@ -91,7 +91,7 @@ $(document).ready(function () {
|
||||
});
|
||||
|
||||
$(document).on('pjax:complete', function () {
|
||||
$(".select2").select2();
|
||||
initPlugins();
|
||||
setEditable();
|
||||
setFieldsEditable();
|
||||
});
|
||||
|
||||
@@ -56,7 +56,7 @@ $(document).ready(() => {
|
||||
});
|
||||
|
||||
$(document).on('pjax:complete', function () {
|
||||
$(".select2").select2();
|
||||
initPlugins();
|
||||
});
|
||||
|
||||
/**
|
||||
|
||||
@@ -31,7 +31,7 @@ $(document).ready(function () {
|
||||
});
|
||||
|
||||
$(document).on('pjax:complete', function () {
|
||||
$(".select2").select2();
|
||||
initPlugins();
|
||||
setEditable();
|
||||
});
|
||||
});
|
||||
|
||||
@@ -23,7 +23,7 @@ $(document).ready(function() {
|
||||
});
|
||||
|
||||
$(document).on('pjax:complete', function() {
|
||||
$(".select2").select2();
|
||||
initPlugins();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
@@ -121,7 +121,7 @@ $(document).ready(function() {
|
||||
});
|
||||
|
||||
$(document).on('pjax:complete', function() {
|
||||
$(".select2").select2();
|
||||
initPlugins();
|
||||
setEditable();
|
||||
});
|
||||
});
|
||||
|
||||
@@ -15,13 +15,14 @@
|
||||
<link href="https://fonts.googleapis.com/css?family=Montserrat:400,700,200" rel="stylesheet"/>
|
||||
<link href="{{ public_asset('/assets/frontend/css/bootstrap.min.css') }}" rel="stylesheet"/>
|
||||
<link href="{{ public_asset('/assets/frontend/css/now-ui-kit.css') }}" rel="stylesheet"/>
|
||||
<link href="{{ public_asset('/assets/frontend/css/styles.css') }}" rel="stylesheet"/>
|
||||
|
||||
{{-- Start of the required files in the head block --}}
|
||||
<link href="{{ public_asset('/assets/global/css/vendor.css') }}" rel="stylesheet"/>
|
||||
@yield('css')
|
||||
@yield('scripts_head')
|
||||
{{-- End of the required stuff in the head block --}}
|
||||
|
||||
<link href="{{ public_asset('/assets/frontend/css/styles.css') }}" rel="stylesheet"/>
|
||||
</head>
|
||||
<body>
|
||||
<!-- Navbar -->
|
||||
@@ -83,7 +84,7 @@
|
||||
|
||||
<script>
|
||||
$(document).ready(function () {
|
||||
$(".select2").select2();
|
||||
$(".select2").select2({width: 'resolve'});
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
@@ -1,10 +1,7 @@
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<h3 class="description">map</h3>
|
||||
</div>
|
||||
<div class="col-12">
|
||||
<div class="box-body">
|
||||
<div id="map" style="width: 100%; height: 800px"></div>
|
||||
<div id="map" style="width: 100%; height: 600px"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -3,63 +3,74 @@
|
||||
|
||||
@section('content')
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<h2 class="description">{{ $flight->ident }}</h2>
|
||||
<div class="col-8">
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<h2>{{ $flight->ident }}</h2>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<table class="table">
|
||||
<tr>
|
||||
<td>Departure</td>
|
||||
<td>
|
||||
{{ $flight->dpt_airport->name }}
|
||||
(<a href="{{route('frontend.airports.show', [
|
||||
'id' => $flight->dpt_airport->icao
|
||||
])}}">{{$flight->dpt_airport->icao}}</a>)
|
||||
@ {{ $flight->dpt_time }}
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>Arrival</td>
|
||||
<td>
|
||||
{{ $flight->arr_airport->name }}
|
||||
(<a href="{{route('frontend.airports.show', [
|
||||
'id' => $flight->arr_airport->icao
|
||||
])}}">{{$flight->arr_airport->icao}}</a>)
|
||||
@ {{ $flight->arr_time }}</td>
|
||||
</tr>
|
||||
@if($flight->alt_airport_id)
|
||||
<tr>
|
||||
<td>Alternate Airport</td>
|
||||
<td>
|
||||
{{ $flight->alt_airport->full_name }}
|
||||
</td>
|
||||
</tr>
|
||||
@endif
|
||||
|
||||
<tr>
|
||||
<td>Route</td>
|
||||
<td>{{ $flight->route }}</td>
|
||||
</tr>
|
||||
|
||||
@if(filled($flight->notes))
|
||||
<tr>
|
||||
<td>Notes</td>
|
||||
<td>{{ $flight->notes }}</td>
|
||||
</tr>
|
||||
@endif
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
@include('flights.map')
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<table class="table">
|
||||
<tr>
|
||||
<td>Departure</td>
|
||||
<td>
|
||||
<a href="{{route('frontend.airports.show', ['id'=>$flight->dpt_airport_id])}}">
|
||||
{{ $flight->dpt_airport->full_name }}</a>
|
||||
@ {{ $flight->dpt_time }}</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>Arrival</td>
|
||||
<td>
|
||||
<a href="{{route('frontend.airports.show', ['id'=>$flight->arr_airport_id])}}">
|
||||
{{ $flight->arr_airport->full_name }}</a> @ {{ $flight->arr_time }}</td>
|
||||
</tr>
|
||||
@if($flight->alt_airport_id)
|
||||
<tr>
|
||||
<td>Alternate Airport</td>
|
||||
<td>
|
||||
{{ $flight->alt_airport->full_name }}
|
||||
</td>
|
||||
</tr>
|
||||
@endif
|
||||
|
||||
<tr>
|
||||
<td>Route</td>
|
||||
<td>{{ $flight->route }}</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>Notes</td>
|
||||
<td>{{ $flight->notes }}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div style="padding: 10px;"></div>
|
||||
<div class="row">
|
||||
<div class="col-6">
|
||||
<div class="col-4">
|
||||
<h5>{{$flight->dpt_airport_id}} METAR</h5>
|
||||
{{ Widget::Weather([
|
||||
'icao' => $flight->dpt_airport_id,
|
||||
]) }}
|
||||
</div>
|
||||
<div class="col-6">
|
||||
|
||||
<h5>{{$flight->arr_airport_id}} METAR</h5>
|
||||
{{ Widget::Weather([
|
||||
'icao' => $flight->arr_airport_id,
|
||||
]) }}
|
||||
</div>
|
||||
</div>
|
||||
@include('flights.map')
|
||||
@endsection
|
||||
|
||||
@@ -4,15 +4,15 @@
|
||||
@section('content')
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<h2 class="description">New Flight Report</h2>
|
||||
<h2>New Flight Report</h2>
|
||||
@include('flash::message')
|
||||
{{ Form::open(['route' => 'frontend.pireps.store']) }}
|
||||
|
||||
@include("pireps.fields")
|
||||
@include('pireps.fields')
|
||||
|
||||
{{ Form::close() }}
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@include("pireps.scripts")
|
||||
@include('pireps.scripts')
|
||||
|
||||
@@ -5,9 +5,12 @@
|
||||
<div class="col-md-12">
|
||||
<h2 class="description">Edit Flight Report</h2>
|
||||
@include('flash::message')
|
||||
{{ Form::model($pirep, ['route' => ['frontend.pireps.update', $pirep->id], 'method' => 'patch']) }}
|
||||
{{ Form::model($pirep, [
|
||||
'route' => ['frontend.pireps.update', $pirep->id],
|
||||
'class' => 'form-group',
|
||||
'method' => 'patch']) }}
|
||||
|
||||
@include("pireps.fields")
|
||||
@include('pireps.fields')
|
||||
|
||||
{{ Form::close() }}
|
||||
</div>
|
||||
|
||||
@@ -1,27 +1,24 @@
|
||||
@if($aircraft)
|
||||
<h3 class="description">Fares</h3>
|
||||
<table class="table table-hover">
|
||||
<thead>
|
||||
<th></th>
|
||||
<th>Count</th>
|
||||
</thead>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($aircraft->subfleet->fares as $fare)
|
||||
<tr>
|
||||
<td style="text-align: right;">{{ $fare->name }} ({{ $fare->code }})</td>
|
||||
<td>
|
||||
@if($read_only)
|
||||
<p>{{ $pirep->{'fare_'.$fare->id} }}</p>
|
||||
{{ Form::hidden('fare_'.$fare->id) }}
|
||||
@else
|
||||
<div class="input-group form-group">
|
||||
{{ Form::number('fare_'.$fare->id, null, ['class' => 'form-control', 'min' => 0]) }}
|
||||
</div>
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="form-container">
|
||||
<h6><i class="fas fa-ellipsis-h"></i>
|
||||
Fares
|
||||
</h6>
|
||||
<div class="form-container-body">
|
||||
@foreach($aircraft->subfleet->fares as $fare)
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
{{Form::label('fare_'.$fare->id, $fare->name.' ('.$fare->code.')')}}
|
||||
@if($read_only)
|
||||
<p>{{ $pirep->{'fare_'.$fare->id} }}</p>
|
||||
{{ Form::hidden('fare_'.$fare->id) }}
|
||||
@else
|
||||
<div class="input-group form-group">
|
||||
{{ Form::number('fare_'.$fare->id, null, ['class' => 'form-control', 'min' => 0]) }}
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
@endforeach
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@@ -11,227 +11,287 @@ flight reports that have been filed. You've been warned!
|
||||
@if($read_only)
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
@component("components.info")
|
||||
@component('components.info')
|
||||
Once a PIREP has been accepted/rejected, certain fields go into read-only mode.
|
||||
@endcomponent
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<table class="table table-full-width">
|
||||
<thead>
|
||||
<div class="col-8">
|
||||
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>Airline</td>
|
||||
<td>
|
||||
@if($read_only)
|
||||
<p>{{ $pirep->airline->name }}</p>
|
||||
{{ Form::hidden('airline_id') }}
|
||||
@else
|
||||
<div class="input-group form-group">
|
||||
{{ Form::select('airline_id', $airline_list, null, [
|
||||
'class' => 'custom-select select2',
|
||||
'readonly' => $read_only]) }}
|
||||
</div>
|
||||
<p class="text-danger">{{ $errors->first('airline_id') }}</p>
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>Flight Number/Code/Leg</td>
|
||||
<td>
|
||||
@if($read_only)
|
||||
<p>{{ $pirep->ident }}
|
||||
{{ Form::hidden('flight_number') }}
|
||||
{{ Form::hidden('flight_code') }}
|
||||
{{ Form::hidden('flight_leg') }}
|
||||
</p>
|
||||
@else
|
||||
<div class="input-group form-group" style="max-width: 400px;">
|
||||
{{ Form::text('flight_number', null, [
|
||||
'placeholder' => 'Flight Number',
|
||||
'class' => 'form-control',
|
||||
'readonly' => $read_only]) }}
|
||||
|
||||
{{ Form::text('route_code', null, [
|
||||
'placeholder' => 'Code (optional)',
|
||||
'class' => 'form-control',
|
||||
'readonly' => $read_only]) }}
|
||||
|
||||
{{ Form::text('route_leg', null, [
|
||||
'placeholder' => 'Leg (optional)',
|
||||
'class' => 'form-control',
|
||||
'readonly' => $read_only]) }}
|
||||
</div>
|
||||
<p class="text-danger">{{ $errors->first('flight_number') }}</p>
|
||||
<p class="text-danger">{{ $errors->first('route_code') }}</p>
|
||||
<p class="text-danger">{{ $errors->first('route_leg') }}</p>
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>Aircraft</td>
|
||||
<td>
|
||||
@if($read_only)
|
||||
<p>{{ $pirep->aircraft->name }}</p>
|
||||
{{ Form::hidden('aircraft_id') }}
|
||||
@else
|
||||
<div class="input-group form-group">
|
||||
{{-- You probably don't want to change this ID if you want the fare select to work --}}
|
||||
{{ Form::select('aircraft_id', $aircraft_list, null, [
|
||||
'id' => 'aircraft_select',
|
||||
'class' => 'custom-select select2',
|
||||
'readonly' => $read_only
|
||||
]) }}
|
||||
</div>
|
||||
<p class="text-danger">{{ $errors->first('aircraft_id') }}</p>
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>Flight Type</td>
|
||||
<td>
|
||||
@if($read_only)
|
||||
<p>{{ \App\Models\Enums\FlightType::label($pirep->flight_type) }}</p>
|
||||
{{ Form::hidden('flight_type') }}
|
||||
@else
|
||||
<div class="input-group form-group">
|
||||
{{ Form::select('flight_type',
|
||||
\App\Models\Enums\FlightType::select(),
|
||||
null, [
|
||||
'class' => 'custom-select select2',
|
||||
'readonly' => $read_only
|
||||
])
|
||||
}}
|
||||
</div>
|
||||
<p class="text-danger">{{ $errors->first('flight_type') }}</p>
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>Origin Airport</td>
|
||||
<td>
|
||||
@if($read_only)
|
||||
<p>{{ $pirep->dpt_airport->id }} - {{ $pirep->dpt_airport->name }}</p>
|
||||
{{ Form::hidden('dpt_airport_id') }}
|
||||
@else
|
||||
<div class="input-group form-group">
|
||||
{{ Form::select('dpt_airport_id', $airport_list, null, [
|
||||
<div class="form-container">
|
||||
<h6><i class="fas fa-info-circle"></i>
|
||||
Flight Information
|
||||
</h6>
|
||||
<div class="form-container-body">
|
||||
<div class="row">
|
||||
<div class="col-sm-4">
|
||||
{{ Form::label('airline_id', 'Airline') }}
|
||||
@if($read_only)
|
||||
<p>{{ $pirep->airline->name }}</p>
|
||||
{{ Form::hidden('airline_id') }}
|
||||
@else
|
||||
<div class="input-group input-group form-group">
|
||||
{{ Form::select('airline_id', $airline_list, null, [
|
||||
'class' => 'custom-select select2',
|
||||
'readonly' => $read_only
|
||||
]) }}
|
||||
</div>
|
||||
<p class="text-danger">{{ $errors->first('dpt_airport_id') }}</p>
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>Arrival Airport</td>
|
||||
<td>
|
||||
@if($read_only)
|
||||
<p>{{ $pirep->arr_airport->id }}
|
||||
- {{ $pirep->arr_airport->name }}</p>
|
||||
{{ Form::hidden('arr_airport_id') }}
|
||||
@else
|
||||
<div class="input-group form-group">
|
||||
{{ Form::select('arr_airport_id', $airport_list, null, [
|
||||
'class' => 'custom-select select2',
|
||||
'readonly' => $read_only
|
||||
]) }}
|
||||
</div>
|
||||
<p class="text-danger">{{ $errors->first('arr_airport_id') }}</p>
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="align-text-top">Flight Time</td>
|
||||
<td>
|
||||
@if($read_only)
|
||||
<p>
|
||||
{{ $pirep->hours }} hours, {{ $pirep->minutes }} minutes
|
||||
{{ Form::hidden('hours') }}
|
||||
{{ Form::hidden('minutes') }}
|
||||
</p>
|
||||
@else
|
||||
<div class="input-group" style="max-width: 200px;">
|
||||
{{ Form::number('hours', null, [
|
||||
'class' => 'form-control',
|
||||
'placeholder' => 'hours',
|
||||
'min' => '0',
|
||||
'readonly' => $read_only
|
||||
]) }}
|
||||
|
||||
{{ Form::number('minutes', null, [
|
||||
'class' => 'form-control',
|
||||
'placeholder' => 'minutes',
|
||||
'min' => 0,
|
||||
'readonly' => $read_only
|
||||
]) }}
|
||||
</div>
|
||||
<p class="text-danger">{{ $errors->first('hours') }}</p>
|
||||
<p class="text-danger">{{ $errors->first('minutes') }}</p>
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
{{--
|
||||
Write out the custom fields, and label if they're required
|
||||
--}}
|
||||
@foreach($pirep_fields as $field)
|
||||
<tr>
|
||||
<td>
|
||||
{{ $field->name }}
|
||||
@if($field->required === true)
|
||||
<span class="text-danger">*</span>
|
||||
'style' => 'width: 100%',
|
||||
'readonly' => $read_only]) }}
|
||||
</div>
|
||||
<p class="text-danger">{{ $errors->first('airline_id') }}</p>
|
||||
@endif
|
||||
</td>
|
||||
<td>
|
||||
<div class="input-group form-group">
|
||||
{{ Form::text($field->slug, null, [
|
||||
'class' => 'form-control'
|
||||
]) }}
|
||||
</div>
|
||||
<div class="col-sm-4">
|
||||
{{ Form::label('flight_number', 'Flight Number/Code/Leg') }}
|
||||
@if($read_only)
|
||||
<p>{{ $pirep->ident }}
|
||||
{{ Form::hidden('flight_number') }}
|
||||
{{ Form::hidden('flight_code') }}
|
||||
{{ Form::hidden('flight_leg') }}
|
||||
</p>
|
||||
@else
|
||||
<div class="input-group input-group-sm mb3">
|
||||
{{ Form::text('flight_number', null, [
|
||||
'placeholder' => 'Flight Number',
|
||||
'class' => 'form-control',
|
||||
'readonly' => $read_only]) }}
|
||||
|
||||
{{ Form::text('route_code', null, [
|
||||
'placeholder' => 'Code (optional)',
|
||||
'class' => 'form-control',
|
||||
'readonly' => $read_only]) }}
|
||||
|
||||
{{ Form::text('route_leg', null, [
|
||||
'placeholder' => 'Leg (optional)',
|
||||
'class' => 'form-control',
|
||||
'readonly' => $read_only]) }}
|
||||
</div>
|
||||
<p class="text-danger">{{ $errors->first('flight_number') }}</p>
|
||||
<p class="text-danger">{{ $errors->first('route_code') }}</p>
|
||||
<p class="text-danger">{{ $errors->first('route_leg') }}</p>
|
||||
@endif
|
||||
</div>
|
||||
<div class="col-lg-4">
|
||||
{{ Form::label('flight_type', 'Flight Type') }}
|
||||
@if($read_only)
|
||||
<p>{{ \App\Models\Enums\FlightType::label($pirep->flight_type) }}</p>
|
||||
{{ Form::hidden('flight_type') }}
|
||||
@else
|
||||
<div class="form-group">
|
||||
{{ Form::select('flight_type',
|
||||
\App\Models\Enums\FlightType::select(), null, [
|
||||
'class' => 'custom-select select2',
|
||||
'style' => 'width: 100%',
|
||||
'readonly' => $read_only
|
||||
])
|
||||
}}
|
||||
</div>
|
||||
<p class="text-danger">{{ $errors->first('flight_type') }}</p>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-3">
|
||||
{{ Form::label('hours', 'Flight Time') }}
|
||||
@if($read_only)
|
||||
<p>
|
||||
{{ $pirep->hours }} hours, {{ $pirep->minutes }} minutes
|
||||
{{ Form::hidden('hours') }}
|
||||
{{ Form::hidden('minutes') }}
|
||||
</p>
|
||||
@else
|
||||
<div class="input-group input-group-sm" style="max-width: 200px;">
|
||||
{{ Form::number('hours', null, [
|
||||
'class' => 'form-control',
|
||||
'placeholder' => 'hours',
|
||||
'min' => '0',
|
||||
'readonly' => $read_only
|
||||
]) }}
|
||||
|
||||
{{ Form::number('minutes', null, [
|
||||
'class' => 'form-control',
|
||||
'placeholder' => 'minutes',
|
||||
'min' => 0,
|
||||
'readonly' => $read_only
|
||||
]) }}
|
||||
</div>
|
||||
<p class="text-danger">{{ $errors->first('hours') }}</p>
|
||||
<p class="text-danger">{{ $errors->first('minutes') }}</p>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-3">
|
||||
{{--{{ Form::label('submitted_date', 'Date Flown') }}
|
||||
{{ Form::text('submmitted_date', null, [
|
||||
'placeholder' => 'Departure TIme',
|
||||
'class' => 'form-control',
|
||||
'readonly' => $read_only]) }}--}}
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-3">
|
||||
{{--{{ Form::label('departure_time', 'Departure Time') }}
|
||||
{{ Form::text('departure_time', null, [
|
||||
'placeholder' => 'Departure TIme',
|
||||
'class' => 'form-control',
|
||||
'readonly' => $read_only]) }}--}}
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-3">
|
||||
{{--{{ Form::label('arrival_time', 'Arrival Time') }}
|
||||
{{ Form::text('arrival_time', null, [
|
||||
'placeholder' => 'Arrival TIme',
|
||||
'class' => 'form-control',
|
||||
'readonly' => $read_only]) }}--}}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-container">
|
||||
<h6><i class="fas fa-globe"></i>
|
||||
Arrival/Departure Information
|
||||
</h6>
|
||||
<div class="form-container-body">
|
||||
<div class="row">
|
||||
<div class="col-6">
|
||||
{{ Form::label('dpt_airport_id', 'Departure Airport') }}
|
||||
@if($read_only)
|
||||
{{ $pirep->dpt_airport->name }}
|
||||
(<a href="{{route('frontend.airports.show', [
|
||||
'id' => $pirep->dpt_airport->icao
|
||||
])}}">{{$pirep->dpt_airport->icao}}</a>)
|
||||
{{ Form::hidden('dpt_airport_id') }}
|
||||
@else
|
||||
<div class="form-group">
|
||||
{{ Form::select('dpt_airport_id', $airport_list, null, [
|
||||
'class' => 'custom-select select2',
|
||||
'style' => 'width: 100%',
|
||||
'readonly' => $read_only
|
||||
]) }}
|
||||
</div>
|
||||
<p class="text-danger">{{ $errors->first('dpt_airport_id') }}</p>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
<div class="col-6">
|
||||
{{ Form::label('arr_airport_id', 'Arrival Airport') }}
|
||||
@if($read_only)
|
||||
{{ $pirep->arr_airport->name }}
|
||||
(<a href="{{route('frontend.airports.show', [
|
||||
'id' => $pirep->arr_airport->icao
|
||||
])}}">{{$pirep->arr_airport->icao}}</a>)
|
||||
{{ Form::hidden('arr_airport_id') }}
|
||||
@else
|
||||
<div class="input-group input-group-sm form-group">
|
||||
{{ Form::select('arr_airport_id', $airport_list, null, [
|
||||
'class' => 'custom-select select2',
|
||||
'style' => 'width: 100%',
|
||||
'readonly' => $read_only
|
||||
]) }}
|
||||
</div>
|
||||
<p class="text-danger">{{ $errors->first('arr_airport_id') }}</p>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-container">
|
||||
<h6><i class="fab fa-avianex"></i>
|
||||
Aircraft Information
|
||||
</h6>
|
||||
<div class="form-container-body">
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
{{ Form::label('aircraft_id', 'Aircraft') }}
|
||||
@if($read_only)
|
||||
<p>{{ $pirep->aircraft->name }}</p>
|
||||
{{ Form::hidden('aircraft_id') }}
|
||||
@else
|
||||
<div class="input-group input-group-sm form-group">
|
||||
{{-- You probably don't want to change this ID if you want the fare select to work --}}
|
||||
{{ Form::select('aircraft_id', $aircraft_list, null, [
|
||||
'id' => 'aircraft_select',
|
||||
'class' => 'custom-select select2',
|
||||
'readonly' => $read_only
|
||||
]) }}
|
||||
</div>
|
||||
<p class="text-danger">{{ $errors->first('aircraft_id') }}</p>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-container">
|
||||
<h6><i class="far fa-comments"></i>
|
||||
Remarks
|
||||
</h6>
|
||||
<div class="form-container-body">
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
{{ Form::label('route', 'Route') }}
|
||||
<div class="input-group input-group-sm form-group">
|
||||
{{ Form::textarea('route', null, ['class' => 'form-control', 'placeholder' => 'Route']) }}
|
||||
<p class="text-danger">{{ $errors->first('route') }}</p>
|
||||
</div>
|
||||
<p class="text-danger">{{ $errors->first($field->slug) }}</p>
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
|
||||
<tr>
|
||||
<td class="align-text-top">Route</td>
|
||||
<td>
|
||||
<div class="input-group form-group">
|
||||
{{ Form::textarea('route', null, ['class' => 'form-control', 'placeholder' => 'Route']) }}
|
||||
</div>
|
||||
<p class="text-danger">{{ $errors->first('route') }}</p>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="align-text-top"><p class="">Notes</p></td>
|
||||
<td>
|
||||
<div class="input-group form-group">
|
||||
{{ Form::textarea('notes', null, ['class' => 'form-control', 'placeholder' => 'Notes']) }}
|
||||
<div class="col">
|
||||
{{ Form::label('notes', 'Notes') }}
|
||||
<div class="input-group input-group-sm form-group">
|
||||
{{ Form::textarea('notes', null, ['class' => 'form-control', 'placeholder' => 'Notes']) }}
|
||||
<p class="text-danger">{{ $errors->first('notes') }}</p>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<p class="text-danger">{{ $errors->first('notes') }}</p>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
{{-- You don't want to change this ID unless you don't want the fares form to work :) --}}
|
||||
<div id="fares_container" class="col-sm-12">
|
||||
@include("pireps.fares")
|
||||
|
||||
<div class="col-4">
|
||||
|
||||
<div class="form-container">
|
||||
<h6><i class="fab fa-wpforms"></i>
|
||||
Fields
|
||||
</h6>
|
||||
<div class="form-container-body">
|
||||
|
||||
{{--
|
||||
Write out the custom fields, and label if they're required
|
||||
--}}
|
||||
@foreach($pirep_fields as $field)
|
||||
<tr>
|
||||
<td>
|
||||
{{ $field->name }}
|
||||
@if($field->required === true)
|
||||
<span class="text-danger">*</span>
|
||||
@endif
|
||||
</td>
|
||||
<td>
|
||||
<div class="input-group input-group-sm form-group">
|
||||
{{ Form::text($field->slug, null, [
|
||||
'class' => 'form-control'
|
||||
]) }}
|
||||
</div>
|
||||
<p class="text-danger">{{ $errors->first($field->slug) }}</p>
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="fares_container">
|
||||
@include('pireps.fares')
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
@@ -239,7 +299,8 @@ flight reports that have been filed. You've been warned!
|
||||
<div class="col-sm-12">
|
||||
<div class="float-right">
|
||||
<div class="form-group">
|
||||
{{ Form::submit('Save PIREP', ['class' => 'btn btn-primary']) }}
|
||||
{{--{{ Form::button('Save Draft', ['class' => 'btn btn-primary']) }}--}}
|
||||
{{ Form::submit('Save PIREP', ['class' => 'btn btn-info']) }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div style="float:right;">
|
||||
<a class="btn btn-primary pull-right btn-lg"
|
||||
<a class="btn btn-info pull-right btn-lg"
|
||||
style="margin-top: -10px;margin-bottom: 5px"
|
||||
href="{{ route('frontend.pireps.create') }}">File New PIREP</a>
|
||||
</div>
|
||||
|
||||
@@ -71,13 +71,13 @@
|
||||
|
||||
{{--
|
||||
|
||||
SIDEBAR
|
||||
RIGHT SIDEBAR
|
||||
|
||||
--}}
|
||||
|
||||
<div class="col-4">
|
||||
|
||||
<h5>flight info</h5>
|
||||
<h2> </h2>
|
||||
<table class="table table-hover table-condensed">
|
||||
<tr>
|
||||
<td width="30%">Status</td>
|
||||
|
||||
Reference in New Issue
Block a user