Auto-select already chosen class
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Matt Burchett 2021-04-09 01:49:04 -07:00
parent 0145a8073a
commit 34ec3232d1

View File

@ -78,7 +78,7 @@
</td>
</tr>
<!-- Edit Ship Confirmation Modal -->
<!-- Edit Ship Modal -->
<div class="modal fade" id="editShip-{{ $ship->id }}" tabindex="-1" role="dialog" aria-labelledby="editShip-{{ $ship->id }}" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
@ -103,7 +103,11 @@
<label for="shipType">Ship Type</label>
<select name="shipType" for="shipType" class="form-control">
@foreach($eliteShips as $eliteShip)
<option value="{{$eliteShip->shipName}}">{{$eliteShip->shipName}}</option>
@if($ship->shipType === $eliteShip->shipName)
<option selected value="{{$eliteShip->shipName}}">{{$eliteShip->shipName}}</option>
@else
<option value="{{$eliteShip->shipName}}">{{$eliteShip->shipName}}</option>
@endif
@endforeach
</select>
</div>