2015-03-06 21:58:53 +01:00
|
|
|
{% extends "layout.html" %}
|
|
|
|
|
|
|
|
{% block navigation %}
|
2015-03-16 22:06:59 +01:00
|
|
|
<li><a href='{{ url_for('create_pit_stop_form') }}' class="active">Create Pitstop</a></li>
|
|
|
|
<li><a href='{{ url_for('get_statistics') }}'>Statistics</a></li>
|
2015-03-15 07:28:34 +01:00
|
|
|
<li><a href='{{ url_for('get_services') }}'>Services</a></li>
|
2015-03-06 21:58:53 +01:00
|
|
|
{% endblock %}
|
|
|
|
|
2015-03-16 22:06:59 +01:00
|
|
|
|
2015-03-06 21:58:53 +01:00
|
|
|
{% block body %}
|
2015-03-16 22:06:59 +01:00
|
|
|
{{ service_warning() }}
|
|
|
|
|
|
|
|
<form class='form-horizontal' id='createPitStop' action="{{ url_for('create_pit_stop') }}" method='post'>
|
2015-03-06 21:58:53 +01:00
|
|
|
|
|
|
|
<!-- Text input-->
|
2015-03-13 22:40:27 +01:00
|
|
|
<div class="form-group {% if data.error['date'] %}has-error{% endif %}">
|
|
|
|
<label class="col-sm-2 control-label" for="date">Date of Pitstop</label>
|
|
|
|
<div class="col-sm-10">
|
|
|
|
<input class="form-control" id="date" name="date" placeholder="" required="" type="date" value='{{ data.last.date }}' />
|
|
|
|
<p class='error'>{{ data.error['date'] }}</p>
|
|
|
|
</div>
|
2015-03-06 21:58:53 +01:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<!-- Text input-->
|
2015-03-13 22:40:27 +01:00
|
|
|
<div class="form-group {% if data.error['odometer'] %}has-error{% endif %}">
|
|
|
|
<label class="col-sm-2 control-label" for="odometer">Odometer (km)</label>
|
|
|
|
<div class="col-sm-10">
|
|
|
|
<input class="form-control" id="odometer" name="odometer" placeholder="" type="number" value='{{ data.last.odometer }}' />
|
|
|
|
<p class='error'>{{ data.error['odometer'] }}</p>
|
2015-03-06 21:58:53 +01:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<!-- Text input-->
|
2015-03-13 22:40:27 +01:00
|
|
|
<div class="form-group {% if data.error['litres'] %}has-error{% endif %}">
|
|
|
|
<label class="col-sm-2 control-label" for="litres">Litres (l)</label>
|
|
|
|
<div class="col-sm-10">
|
2015-03-15 07:28:34 +01:00
|
|
|
<input class="form-control" id="litres" name="litres" placeholder="" type="number" step='0.1' value='{{ data.last.litres }}' />
|
2015-03-13 22:40:27 +01:00
|
|
|
<p class='error'>{{ data.error['litres'] }}</p>
|
2015-03-06 21:58:53 +01:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<!-- Button (Double) -->
|
2015-03-13 22:40:27 +01:00
|
|
|
<div class="form-group">
|
2015-03-06 21:58:53 +01:00
|
|
|
<div class="controls">
|
2015-03-16 22:06:59 +01:00
|
|
|
<button id="buttonLogId" name="buttonLogId" class="btn btn-success" onclick="document.getElementById('create_pit_stop').submit();">Log Pitstop</button>
|
|
|
|
<button id="buttonAbortId" name="buttonAbortId" class="btn btn-warning" onclick="window.location.href='{{ url_for('get_pit_stops') }}'" type="button" >Abort</button>
|
2015-03-06 21:58:53 +01:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
|
|
|
|
{% endblock %}
|