Fix for SimBrief VATSIM Prefile errors (#1037)

Speed is now checked and leading zero is removed, also changed the initial altitude to full feet value like 23000 instead of just 230.
This commit is contained in:
B.Fatih KOZ 2021-02-19 02:02:33 +03:00 committed by GitHub
parent bd85a04530
commit fe41e61c02
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -223,8 +223,8 @@
<form action="https://my.vatsim.net/pilots/flightplan" method="GET" target="_blank"> <form action="https://my.vatsim.net/pilots/flightplan" method="GET" target="_blank">
<input type="hidden" name="raw" value="{{ $simbrief->xml->atc->flightplan_text }}"> <input type="hidden" name="raw" value="{{ $simbrief->xml->atc->flightplan_text }}">
<input type="hidden" name="fuel_time" value="@secstohhmm($simbrief->xml->times->endurance)"> <input type="hidden" name="fuel_time" value="@secstohhmm($simbrief->xml->times->endurance)">
<input type="hidden" name="speed" value="{{ $simbrief->xml->atc->initial_spd }}"> <input type="hidden" name="speed" value="@if(substr($simbrief->xml->atc->initial_spd,0,1) === '0') {{ substr($simbrief->xml->atc->initial_spd,1) }} @else {{ $simbrief->xml->atc->initial_spd }} @endif">
<input type="hidden" name="altitude" value="{{ $simbrief->xml->atc->initial_alt }}"> <input type="hidden" name="altitude" value="{{ $simbrief->xml->general->initial_altitude }}">
<input id="vatsim_prefile" type="submit" class="btn btn-primary" value="File ATC on VATSIM"/> <input id="vatsim_prefile" type="submit" class="btn btn-primary" value="File ATC on VATSIM"/>
</form> </form>
</div> </div>