Merge branch 'master' into user_handling
Conflicts: app/main.py app/requirements.txt
This commit is contained in:
@@ -1,43 +1,13 @@
|
||||
{% extends "layout.html" %}
|
||||
|
||||
{% block body %}
|
||||
|
||||
<form class='form-horizontal' id='createPitStop' action="{{ url_for('create_pit_stop') }}" method='post'>
|
||||
|
||||
<!-- Text input-->
|
||||
<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>
|
||||
</div>
|
||||
|
||||
<!-- Text input-->
|
||||
<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>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Text input-->
|
||||
<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">
|
||||
<input class="form-control" id="litres" name="litres" placeholder="" type="number" step='0.1' value='{{ data.last.litres }}' />
|
||||
<p class='error'>{{ data.error['litres'] }}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Button (Double) -->
|
||||
<div class="form-group">
|
||||
<div class="controls">
|
||||
<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>
|
||||
</div>
|
||||
</div>
|
||||
<form class='form-horizontal' method="POST">
|
||||
{{ form.hidden_tag() }}
|
||||
{{ render_field_with_errors(form.date) }}
|
||||
{{ render_field_with_errors(form.odometer) }}
|
||||
{{ render_field_with_errors(form.litres) }}
|
||||
<input type="submit" value="Go">
|
||||
</form>
|
||||
|
||||
{% endblock %}
|
||||
|
||||
|
||||
{% endblock %}
|
||||
|
||||
Reference in New Issue
Block a user