diff --git a/resources/lang/en/common.php b/resources/lang/en/common.php index 4cf9a4e2..1010bf89 100644 --- a/resources/lang/en/common.php +++ b/resources/lang/en/common.php @@ -25,6 +25,7 @@ return [ 'aircraft' => 'Aircraft', 'airline' => 'Airline', 'distance' => 'Distance', + 'fuel' => 'Fuel', 'metar' => 'METAR', 'hour' => 'Hour|Hours', 'minute' => 'Minute|Minutes', diff --git a/resources/lang/en/pireps.php b/resources/lang/en/pireps.php index d79164f9..46bdcb06 100644 --- a/resources/lang/en/pireps.php +++ b/resources/lang/en/pireps.php @@ -21,6 +21,7 @@ return [ 'fieldsreadonly' => 'Once a PIREP has been submitted, certain fields go into read-only mode.', 'flightinformations' => 'Flight Information', 'flightident' => 'Flight Number/Code/Leg', + 'fuel_used' => 'Fuel Used', 'codeoptional' => 'Code (optional)', 'legoptional' => 'Leg (optional)', 'deparrinformations' => 'Departure/Arrival Information', @@ -28,7 +29,6 @@ return [ 'dateflown' => 'Date Flown', 'deletepirep' => 'Delete PIREP', 'submitted' => 'Submitted', - 'source_types' => [ 'manual' => 'Manual', 'acars' => 'ACARS', diff --git a/resources/lang/es/common.php b/resources/lang/es/common.php index 0691a542..7bf2f944 100644 --- a/resources/lang/es/common.php +++ b/resources/lang/es/common.php @@ -25,6 +25,7 @@ return [ 'aircraft' => 'Aeronave', 'airline' => 'Aerolínea', 'distance' => 'Distancía', + 'fuel' => 'Combustible', 'metar' => 'METAR', 'hour' => 'Hora|Horas', 'minute' => 'Minuto|Minutos', diff --git a/resources/lang/es/pireps.php b/resources/lang/es/pireps.php index 56d70bdf..e9e0b76b 100644 --- a/resources/lang/es/pireps.php +++ b/resources/lang/es/pireps.php @@ -21,6 +21,7 @@ return [ 'fieldsreadonly' => 'Una vez que se ha enviado un PIREP, ciertos campos pasan al modo de solo lectura.', 'flightinformations' => 'Información de vuelo', 'flightident' => 'Vuelo Número/Código/Etapa', + 'fuel_used' => 'Combustible Usado', 'codeoptional' => 'Código (opcional)', 'legoptional' => 'Etapa (opcional)', 'deparrinformations' => 'Información Salida/Legada', @@ -28,7 +29,6 @@ return [ 'dateflown' => 'Fecha de vuelo', 'deletepirep' => 'Borrar PIREP', 'submitted' => 'Enviado', - 'source_types' => [ 'manual' => 'Manual', 'acars' => 'ACARS', diff --git a/resources/lang/it/common.php b/resources/lang/it/common.php index ff9f3972..61e77bb5 100644 --- a/resources/lang/it/common.php +++ b/resources/lang/it/common.php @@ -25,6 +25,7 @@ return [ 'aircraft' => 'Aereomobile', 'airline' => 'Compagnia Aerea', 'distance' => 'Distanza', + 'fuel' => 'Carburante', 'metar' => 'METAR', 'hour' => 'Ora|Ore', 'minute' => 'Minuto|Minuti', diff --git a/resources/lang/it/pireps.php b/resources/lang/it/pireps.php index 3d18d9da..92d49163 100644 --- a/resources/lang/it/pireps.php +++ b/resources/lang/it/pireps.php @@ -16,6 +16,7 @@ return [ 'fieldsreadonly' => 'Quando un PIREP viene sottoporre, alcuni cami entrano in modalità di sola lettura.', 'flightinformations' => 'Informazioni di Volo', 'flightident' => 'Numero di Volo/Codice/Leg', + 'fuel_used' => 'Carburante Usato', 'codeoptional' => 'Codice (facoltativo)', 'legoptional' => 'Leg (facoltativa)', 'deparrinformations' => 'Informazioni di Partenza/Arrivo', diff --git a/resources/views/layouts/default/pireps/fares.blade.php b/resources/views/layouts/default/pireps/fares.blade.php index a6c05575..2a2cc196 100644 --- a/resources/views/layouts/default/pireps/fares.blade.php +++ b/resources/views/layouts/default/pireps/fares.blade.php @@ -4,18 +4,13 @@  {{ trans_choice('pireps.fare', 2) }}
- @foreach($pirep->aircraft->subfleet->fares as $fare) + @foreach($aircraft->subfleet->fares as $fare)
{{Form::label('fare_'.$fare->id, $fare->name.' ('.$fare->code.')')}} - @if($pirep->read_only) -

{{ $pirep->{'fare_'.$fare->id} }}

- {{ Form::hidden('fare_'.$fare->id) }} - @else -
- {{ Form::number('fare_'.$fare->id, null, ['class' => 'form-control', 'min' => 0]) }} -
- @endif +
+ {{ Form::number('fare_'.$fare->id, null, ['class' => 'form-control', 'min' => 0]) }} +
@endforeach diff --git a/resources/views/layouts/default/pireps/fields.blade.php b/resources/views/layouts/default/pireps/fields.blade.php index 2c04d844..43770083 100644 --- a/resources/views/layouts/default/pireps/fields.blade.php +++ b/resources/views/layouts/default/pireps/fields.blade.php @@ -211,7 +211,7 @@ flight reports that have been filed. You've been warned!
-
+
{{ Form::label('aircraft_id', __('common.aircraft')) }} @if(!empty($pirep) && $pirep->read_only)

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

@@ -228,10 +228,30 @@ flight reports that have been filed. You've been warned!

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

@endif
+
+ {{ Form::label('fuel_used', __('pireps.fuel_used')) }} + @if(!empty($pirep) && $pirep->read_only) +

{{ $pirep->fuel_used }}

+ @else +
+ {{-- You probably don't want to change this ID if you want the fare select to work --}} + {{ Form::number('fuel_used', null, [ + 'class' => 'form-control', + 'min' => '0', + 'readonly' => (!empty($pirep) && $pirep->read_only), + ]) }} +
+

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

+ @endif +
+
+ @include('pireps.fares') +
+
 @lang('flights.route') @@ -283,9 +303,6 @@ flight reports that have been filed. You've been warned!
@endif -
- @include('pireps.fares') -