- {{ Form::hidden('opt_in', 0, false) }}
- {{ Form::checkbox('opt_in', 1, null) }}
+
+
|
@@ -144,16 +163,14 @@
- {{ Form::submit(__('auth.register'), [
- 'id' => 'register_button',
- 'class' => 'btn btn-primary',
- 'disabled' => true,
- ]) }}
+
- {{ Form::close() }}
+
diff --git a/resources/views/layouts/default/flights/search.blade.php b/resources/views/layouts/default/flights/search.blade.php
index 62d8100ef..df354642d 100644
--- a/resources/views/layouts/default/flights/search.blade.php
+++ b/resources/views/layouts/default/flights/search.blade.php
@@ -2,53 +2,64 @@
diff --git a/resources/views/layouts/default/pireps/create.blade.php b/resources/views/layouts/default/pireps/create.blade.php
index 1dcef11ba..4433eea16 100644
--- a/resources/views/layouts/default/pireps/create.blade.php
+++ b/resources/views/layouts/default/pireps/create.blade.php
@@ -6,15 +6,11 @@
@lang('pireps.newflightreport')
@include('flash::message')
- @if(!empty($pirep))
- {{ Form::model($pirep, ['route' => 'frontend.pireps.store']) }}
- @else
- {{ Form::open(['route' => 'frontend.pireps.store']) }}
- @endif
- @include('pireps.fields')
-
- {{ Form::close() }}
+
@endsection
diff --git a/resources/views/layouts/default/pireps/custom_fields.blade.php b/resources/views/layouts/default/pireps/custom_fields.blade.php
index 37363599b..83de3d23a 100644
--- a/resources/views/layouts/default/pireps/custom_fields.blade.php
+++ b/resources/views/layouts/default/pireps/custom_fields.blade.php
@@ -11,10 +11,7 @@
|
@endsection
diff --git a/resources/views/layouts/default/pireps/fares.blade.php b/resources/views/layouts/default/pireps/fares.blade.php
index d2e959db5..50031ab7d 100644
--- a/resources/views/layouts/default/pireps/fares.blade.php
+++ b/resources/views/layouts/default/pireps/fares.blade.php
@@ -7,9 +7,9 @@
@foreach($aircraft->subfleet->fares as $fare)
diff --git a/resources/views/layouts/default/pireps/fields.blade.php b/resources/views/layouts/default/pireps/fields.blade.php
index df29dfb82..0301a1a21 100644
--- a/resources/views/layouts/default/pireps/fields.blade.php
+++ b/resources/views/layouts/default/pireps/fields.blade.php
@@ -26,48 +26,60 @@
- {{ Form::label('airline_id', __('common.airline')) }}
+
@if(!empty($pirep) && $pirep->read_only)
{{ $pirep->airline->name }}
- {{ Form::hidden('airline_id') }}
+
@else
- {{ Form::select('airline_id', $airline_list, null, [
- 'class' => 'custom-select select2',
- 'style' => 'width: 100%',
- 'readonly' => (!empty($pirep) && $pirep->read_only),
- ]) }}
+
{{ $errors->first('airline_id') }}
@endif
- {{ Form::label('flight_number', __('pireps.flightident')) }}
+
@if(!empty($pirep) && $pirep->read_only)
{{ $pirep->ident }}
- {{ Form::hidden('flight_number') }}
- {{ Form::hidden('flight_code') }}
- {{ Form::hidden('flight_leg') }}
+
+
+
@else
- {{ Form::text('flight_number', null, [
- 'placeholder' => __('flights.flightnumber'),
- 'class' => 'form-control',
- 'readonly' => (!empty($pirep) && $pirep->read_only),
- ]) }}
-
- {{ Form::text('route_code', null, [
- 'placeholder' => __('pireps.codeoptional'),
- 'class' => 'form-control',
- 'readonly' => (!empty($pirep) && $pirep->read_only),
- ]) }}
-
- {{ Form::text('route_leg', null, [
- 'placeholder' => __('pireps.legoptional'),
- 'class' => 'form-control',
- 'readonly' => (!empty($pirep) && $pirep->read_only),
- ]) }}
+ read_only) readonly @endif
+ value="{{ !empty($pirep) ? $pirep->flight_number : old('flight_number') }}"
+ placeholder="@lang('flights.flightnumber')"
+ />
+
+ read_only) readonly @endif
+ value="{{ !empty($pirep) ? $pirep->route_code : old('route_code') }}"
+ placeholder="@lang('pireps.codeoptional')"
+ />
+
+ route_leg) readonly @endif
+ value="{{ !empty($pirep) ? $pirep->route_leg : old('route_leg') }}"
+ placeholder="@lang('pireps.legoptional')"
+ />
{{ $errors->first('flight_number') }}
{{ $errors->first('route_code') }}
@@ -75,19 +87,22 @@
@endif
- {{ Form::label('flight_type', __('flights.flighttype')) }}
+
@if(!empty($pirep) && $pirep->read_only)
{{ \App\Models\Enums\FlightType::label($pirep->flight_type) }}
- {{ Form::hidden('flight_type') }}
+
@else
- {{ Form::select('flight_type',
- \App\Models\Enums\FlightType::select(), null, [
- 'class' => 'custom-select select2',
- 'style' => 'width: 100%',
- 'readonly' => (!empty($pirep) && $pirep->read_only),
- ])
- }}
+
{{ $errors->first('flight_type') }}
@endif
@@ -96,46 +111,55 @@
- {{ Form::label('hours', __('flights.flighttime')) }}
+
@if(!empty($pirep) && $pirep->read_only)
{{ $pirep->hours.' '.trans_choice('common.hour', $pirep->hours) }}
, {{ $pirep->minutes.' '.trans_choice('common.minute', $pirep->minutes) }}
- {{ Form::hidden('hours') }}
- {{ Form::hidden('minutes') }}
+
+
@else
- {{ Form::number('hours', null, [
- 'class' => 'form-control',
- 'placeholder' => trans_choice('common.hour', 2),
- 'min' => '0',
- 'readonly' => (!empty($pirep) && $pirep->read_only),
- ]) }}
+ read_only) readonly @endif
+ placeholder="{{ trans_choice('common.hour', 2) }}"
+ min="0"
+ value="{{ !empty($pirep) ? $pirep->hours : old('hours') }}"
+ />
- {{ Form::number('minutes', null, [
- 'class' => 'form-control',
- 'placeholder' => trans_choice('common.minute', 2),
- 'min' => 0,
- 'readonly' => (!empty($pirep) && $pirep->read_only),
- ]) }}
+ read_only) readonly @endif
+ placeholder="{{ trans_choice('common.minute', 2) }}"
+ min="0"
+ value="{{ !empty($pirep) ? $pirep->minutes : old('minutes') }}"
+ />
{{ $errors->first('hours') }}
{{ $errors->first('minutes') }}
@endif
- {{ Form::label('level', __('flights.level')) }} ({{config('phpvms.internal_units.altitude')}})
+
@if(!empty($pirep) && $pirep->read_only)
{{ $pirep->level }}
@else
- {{ Form::number('level', null, [
- 'class' => 'form-control',
- 'min' => '0',
- 'step' => '0.01',
- 'readonly' => (!empty($pirep) && $pirep->read_only),
- ]) }}
+ read_only) readonly @endif
+ min="0"
+ step="0.01"
+ value="{{ !empty($pirep) ? $pirep->level : old('level') }}"
+ />
{{ $errors->first('level') }}
@endif
@@ -152,40 +176,50 @@
- {{ Form::label('dpt_airport_id', __('airports.departure')) }}
- @if(!empty($pirep) && $pirep->read_only)
+
+ @if(!empty($pirep) && ($pirep->read_only || request()->has('flight_id')))
{{ $pirep->dpt_airport->name }}
( {{$pirep->dpt_airport->icao}})
- {{ Form::hidden('dpt_airport_id') }}
+
@else
- {{ Form::select('dpt_airport_id', $airport_list, null, [
- 'class' => 'custom-select airport_search',
- 'style' => 'width: 100%',
- 'readonly' => (!empty($pirep) && $pirep->read_only),
- ]) }}
+
{{ $errors->first('dpt_airport_id') }}
@endif
- {{ Form::label('arr_airport_id', __('airports.arrival')) }}
- @if(!empty($pirep) && $pirep->read_only)
+
+ @if(!empty($pirep) && ($pirep->read_only || request()->has('flight_id')))
{{ $pirep->arr_airport->name }}
( {{$pirep->arr_airport->icao}})
- {{ Form::hidden('arr_airport_id') }}
+
@else
- {{ Form::select('arr_airport_id', $airport_list, null, [
- 'class' => 'custom-select airport_search',
- 'style' => 'width: 100%',
- 'readonly' => (!empty($pirep) && $pirep->read_only),
- ]) }}
+
{{ $errors->first('arr_airport_id') }}
@endif
@@ -201,50 +235,68 @@
- {{ Form::label('aircraft_id', __('common.aircraft')) }}
+
@if(!empty($pirep) && $pirep->read_only)
{{ $pirep->aircraft->name }}
- {{ Form::hidden('aircraft_id') }}
+
@else
{{-- 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' => (!empty($pirep) && $pirep->read_only),
- ]) }}
+
{{ $errors->first('aircraft_id') }}
@endif
- {{ Form::label('block_fuel', __('pireps.block_fuel')) }} ({{setting('units.fuel')}})
+
@if(!empty($pirep) && $pirep->read_only)
{{ $pirep->block_fuel }}
@else
- {{ Form::number('block_fuel', null, [
- 'class' => 'form-control',
- 'min' => '0',
- 'step' => '0.01',
- 'readonly' => (!empty($pirep) && $pirep->read_only),
- ]) }}
+ read_only) readonly @endif
+ value="{{ !empty($pirep) ? $pirep->block_fuel : old('block_fuel') }}"
+ />
{{ $errors->first('block_fuel') }}
@endif
- {{ Form::label('fuel_used', __('pireps.fuel_used')) }} ({{setting('units.fuel')}})
+
@if(!empty($pirep) && $pirep->read_only)
{{ $pirep->fuel_used }}
@else
- {{ Form::number('fuel_used', null, [
- 'class' => 'form-control',
- 'min' => '0',
- 'step' => '0.01',
- 'readonly' => (!empty($pirep) && $pirep->read_only),
- ]) }}
+ read_only) readonly @endif
+ value="{{ !empty($pirep) ? $pirep->fuel_used : old('fuel_used') }}"
+ />
{{ $errors->first('fuel_used') }}
@endif
@@ -265,11 +317,7 @@
@@ -285,7 +333,7 @@
@@ -319,33 +367,23 @@
- {{ Form::hidden('flight_id') }}
- {{ Form::hidden('sb_id', $simbrief_id) }}
+
+
@if(isset($pirep) && !$pirep->read_only)
- {{ Form::button(__('pireps.deletepirep'), [
- 'name' => 'submit',
- 'value' => 'Delete',
- 'class' => 'btn btn-warning',
- 'type' => 'submit',
- 'onclick' => "return confirm('Are you sure you want to delete this PIREP?')"])
- }}
+
@endif
- {{ Form::button(__('pireps.savepirep'), [
- 'name' => 'submit',
- 'value' => 'Save',
- 'class' => 'btn btn-info',
- 'type' => 'submit'])
- }}
+
@if(!isset($pirep) || (filled($pirep) && !$pirep->read_only))
- {{ Form::button(__('pireps.submitpirep'), [
- 'name' => 'submit',
- 'value' => 'Submit',
- 'class' => 'btn btn-success',
- 'type' => 'submit'])
- }}
+
@endif
diff --git a/resources/views/layouts/default/profile/custom_fields.blade.php b/resources/views/layouts/default/profile/custom_fields.blade.php
index 1427ec68e..14761e83b 100644
--- a/resources/views/layouts/default/profile/custom_fields.blade.php
+++ b/resources/views/layouts/default/profile/custom_fields.blade.php
@@ -7,9 +7,7 @@
|
- {{ Form::text($field->field->slug, $field->value, [
- 'class' => 'form-control',
- ]) }}
+
{{ $errors->first('field_'.$field->slug) }}
|
diff --git a/resources/views/layouts/default/profile/edit.blade.php b/resources/views/layouts/default/profile/edit.blade.php
index 699eab717..dba9ed2ce 100644
--- a/resources/views/layouts/default/profile/edit.blade.php
+++ b/resources/views/layouts/default/profile/edit.blade.php
@@ -6,9 +6,11 @@
@lang('profile.edityourprofile')
@include('flash::message')
- {{ Form::model($user, ['route' => ['frontend.profile.update', $user->id], 'files' => true, 'method' => 'patch']) }}
- @include("profile.fields")
- {{ Form::close() }}
+
@endsection
diff --git a/resources/views/layouts/default/profile/fields.blade.php b/resources/views/layouts/default/profile/fields.blade.php
index 154a9f4b5..fbf9b7041 100644
--- a/resources/views/layouts/default/profile/fields.blade.php
+++ b/resources/views/layouts/default/profile/fields.blade.php
@@ -5,7 +5,7 @@
{{ __('common.name') }} |
- {{ Form::text('name', null, ['class' => 'form-control']) }}
+
@if ($errors->has('name'))
{{ $errors->first('name') }}
@@ -17,7 +17,7 @@
| {{ __('common.email') }} |
- {{ Form::text('email', null, ['class' => 'form-control']) }}
+
@if ($errors->has('email'))
{{ $errors->first('email') }}
@@ -29,7 +29,11 @@
| {{ __('common.airline') }} |
- {{ Form::select('airline_id', $airlines, null , ['class' => 'form-control select2']) }}
+
@if ($errors->has('airline_id'))
{{ $errors->first('airline_id') }}
@@ -41,7 +45,11 @@
| {{ __('airports.home') }} |
- {{ Form::select('home_airport_id', $airports, null , ['class' => 'form-control airport_search '.($hubs_only?'hubs_only':'')]) }}
+
@if ($errors->has('home_airport_id'))
{{ $errors->first('home_airport_id') }}
@@ -53,7 +61,11 @@
| {{ __('common.country') }} |
- {{ Form::select('country', $countries, null, ['class' => 'form-control select2' ]) }}
+
@if ($errors->has('country'))
{{ $errors->first('country') }}
@@ -65,7 +77,15 @@
| {{ __('common.timezone') }} |
- {{ Form::select('timezone', $timezones, null, ['class' => 'form-control select2' ]) }}
+
@if ($errors->has('timezone'))
{{ $errors->first('timezone') }}
@@ -78,7 +98,7 @@
|
{{ __('profile.newpassword') }}:
- {{ Form::password('password', ['class' => 'form-control']) }}
+
@if ($errors->has('password'))
{{ $errors->first('password') }}
@@ -86,7 +106,7 @@
{{ __('passwords.confirm') }}:
- {{ Form::password('password_confirmation', ['class' => 'form-control']) }}
+
@if ($errors->has('password_confirmation'))
{{ $errors->first('password_confirmation') }}
@@ -97,7 +117,7 @@
| {{ __('profile.avatar') }} |
- {{ Form::file('avatar', null) }}
+
{{ __('profile.avatarresize', [
'width' => config('phpvms.avatar.width'),
@@ -120,9 +140,7 @@
|
- {{ Form::text('field_'.$field->slug, $field->value, [
- 'class' => 'form-control',
- ]) }}
+
{{ $errors->first('field_'.$field->slug) }}
|
@@ -133,8 +151,8 @@
{{ __('profile.opt-in') }} |
- {{ Form::hidden('opt_in', 0, false) }}
- {{ Form::checkbox('opt_in', 1, null) }}
+
+
{{ __('profile.opt-in-descrip') }}
@@ -144,7 +162,9 @@
- {{ Form::submit(__('profile.updateprofile'), ['class' => 'btn btn-primary']) }}
+
|