Check the value of winter on the last record

This will ensure that the UX is consistent after the first change to/from
Winter is made
This commit is contained in:
ahosking 2022-11-03 00:06:32 -04:00
parent 526e6d3439
commit da166e5169

View File

@ -47,10 +47,18 @@
<div class="row"> <div class="row">
<div class="col-xs-4"> <div class="col-xs-4">
<label for="winter">Winter Tires:</label> <label for="winter">Winter Tires:</label>
<select name="winter" class="form-control" default="false"> <select name="winter" class="form-control">
<option value="TRUE">True</option> {% if data %}
<option value="FALSE" selected>False</option> {% if data[0]['winter'] == "True" %}
</select> <option value="TRUE" selected>True</option>
<option value="FALSE">False</option>
{% else %}
<option value="TRUE">True</option>
<option value="FALSE" selected>False</option>
{% endif %}
{% endif %}
</select>
</div> </div>
</div><br> </div><br>
<input type="submit" value="Go"> <input type="submit" value="Go">