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="col-xs-4">
<label for="winter">Winter Tires:</label>
<select name="winter" class="form-control" default="false">
<option value="TRUE">True</option>
<option value="FALSE" selected>False</option>
</select>
<select name="winter" class="form-control">
{% if data %}
{% if data[0]['winter'] == "True" %}
<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><br>
<input type="submit" value="Go">