2015-03-06 21:58:53 +01:00
|
|
|
{% extends "layout.html" %}
|
|
|
|
|
|
|
|
{% block navigation %}
|
|
|
|
<li><a href='{{ url_for('getPitStops') }}'>Home</a></li>
|
|
|
|
<li><a href='{{ url_for('createPitStopForm') }}' class="active">Create Pitstop</a></li>
|
2015-03-07 09:51:38 +01:00
|
|
|
<li><a href='{{ url_for('getStatistics') }}'>Statistics</a></li>
|
2015-03-06 21:58:53 +01:00
|
|
|
{% endblock %}
|
|
|
|
|
|
|
|
{% block body %}
|
|
|
|
<form class="form-horizontal" id='createPitStop' action="{{ url_for('createPitStop') }}" method='post'>
|
|
|
|
<fieldset>
|
|
|
|
|
|
|
|
<!-- Form Name -->
|
|
|
|
<legend>Create Pitstop</legend>
|
|
|
|
|
|
|
|
<!-- Text input-->
|
|
|
|
<div class="control-group">
|
|
|
|
<label class="control-label" for="date">Date of Pitstop</label>
|
|
|
|
<div class="controls">
|
|
|
|
<input id="date" name="date" placeholder="" class="input-large" required="" type="date" value='{{ data.last.date }}' />
|
2015-03-09 20:06:17 +01:00
|
|
|
{% if data.error['date'] %}
|
|
|
|
<p class='error'>{{ data.error['date'] }}</p>
|
|
|
|
{% endif %}
|
2015-03-06 21:58:53 +01:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<!-- Text input-->
|
|
|
|
<div class="control-group">
|
|
|
|
<label class="control-label" for="odometer">Odometer</label>
|
|
|
|
<div class="controls">
|
2015-03-09 20:57:02 +01:00
|
|
|
<input id="odometer" name="odometer" placeholder="" class="input-large" required="" type="number" value='{{ data.last.odometer }}' />
|
2015-03-09 20:06:17 +01:00
|
|
|
{% if data.error['odometer'] %}
|
|
|
|
<p class='error'>{{ data.error['odometer'] }}</p>
|
|
|
|
{% endif %}
|
2015-03-06 21:58:53 +01:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<!-- Text input-->
|
|
|
|
<div class="control-group">
|
|
|
|
<label class="control-label" for="litres">Litres</label>
|
|
|
|
<div class="controls">
|
2015-03-09 20:57:02 +01:00
|
|
|
<input id="litres" name="litres" placeholder="" class="input-large" required="" type="number" value='{{ data.last.litres }}' />
|
2015-03-09 20:06:17 +01:00
|
|
|
{% if data.error['litres'] %}
|
|
|
|
<p class='error'>{{ data.error['litres'] }}</p>
|
|
|
|
{% endif %}
|
2015-03-06 21:58:53 +01:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<!-- Button (Double) -->
|
|
|
|
<div class="control-group">
|
|
|
|
<label class="control-label" for="buttonLogId"></label>
|
|
|
|
<div class="controls">
|
|
|
|
<button id="buttonLogId" name="buttonLogId" class="btn btn-success" onclick="document.getElementById('createPitStop').submit();">Log Pitstop</button>
|
|
|
|
<button id="buttonAbortId" type="button" name="buttonAbortId" class="btn btn-warning" onclick="window.location.href='{{ url_for('getPitStops') }}'">Abort</button>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</fieldset>
|
|
|
|
</form>
|
|
|
|
|
|
|
|
{% endblock %}
|