Move SimBrief aircraft selection to Controller (#1093)
* Move SimBrief aircraft selection to Controller Instead of passing subfleets to blade (and doing two foreach loops and ifs to populate the dropdown), we are building a proper aircraft list here. Did not removed $subfleets from data being passed to blade on purpose, it may be removed later on. * Style Fix * Update aircraft selection blade to use $aircrafts * Order generated Aircrafts collection First ICAO then Registration * Add privatized name setting for simbrief To prevent possible privacy issues according to latest regulations. * Add privatized name to SimBrief form It is controlled with a setting, if not enabled we will not pass any names to SimBrief via API (this will result users SimBrief membership name being used at the OFP as before)
This commit is contained in:
@@ -12,13 +12,9 @@
|
||||
<div class="col-md-12">
|
||||
<select id="aircraftselection" class="form-control select2" onchange="checkacselection()">
|
||||
<option value="ZZZZZ">Please Select An Aircraft</option>
|
||||
@foreach($subfleets as $subfleet)
|
||||
@foreach($subfleet->aircraft as $ac)
|
||||
@if(setting('pireps.only_aircraft_at_dpt_airport') && $flight->dpt_airport_id == $ac->airport_id || !setting('pireps.only_aircraft_at_dpt_airport')
|
||||
<option value="{{ $ac->id }}">[ {{ $ac->icao }} ] {{ $ac->registration }}</option>
|
||||
@endif
|
||||
@foreach($aircrafts as $ac)
|
||||
<option value="{{ $ac->id }}">[{{ $ac->icao }}] {{ $ac->registration }} @if($ac->registration != $ac->name)'{{ $ac->name }}'@endif</option>
|
||||
@endforeach
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-md-12 text-right">
|
||||
|
||||
@@ -144,6 +144,9 @@
|
||||
@if(setting('simbrief.callsign', true))
|
||||
<input type="hidden" name="callsign" value="{{ $user->ident }}">
|
||||
@endif
|
||||
@if(setting('simbrief.name_private', true))
|
||||
<input type="hidden" name="cpt" value="{{ $user->name_private }}">
|
||||
@endif
|
||||
<input type="hidden" id="steh" name="steh" maxlength="2">
|
||||
<input type="hidden" id="stem" name="stem" maxlength="2">
|
||||
<input type="hidden" id="date" name="date" maxlength="9">
|
||||
|
||||
Reference in New Issue
Block a user