little design work

This commit is contained in:
joachim lusiardi 2015-03-13 22:40:27 +01:00
parent 2f6f6fd7c8
commit 9b767ec1ea
4 changed files with 23 additions and 39 deletions

View File

@ -19,7 +19,7 @@ td {
} }
.error { .error {
color: red; color: #a94442;
} }
.pitstop { .pitstop {

View File

@ -1,61 +1,47 @@
{% extends "layout.html" %} {% extends "layout.html" %}
{% block navigation %} {% block navigation %}
<li><a href='{{ url_for('getPitStops') }}'>Home</a></li>
<li><a href='{{ url_for('createPitStopForm') }}' class="active">Create Pitstop</a></li> <li><a href='{{ url_for('createPitStopForm') }}' class="active">Create Pitstop</a></li>
<li><a href='{{ url_for('getStatistics') }}'>Statistics</a></li> <li><a href='{{ url_for('getStatistics') }}'>Statistics</a></li>
{% endblock %} {% endblock %}
{% block body %} {% block body %}
<form class="form-horizontal" id='createPitStop' action="{{ url_for('createPitStop') }}" method='post'> <form class='form-horizontal' id='createPitStop' action="{{ url_for('createPitStop') }}" method='post'>
<fieldset>
<!-- Form Name -->
<legend>Create Pitstop</legend>
<!-- Text input--> <!-- Text input-->
<div class="control-group"> <div class="form-group {% if data.error['date'] %}has-error{% endif %}">
<label class="control-label" for="date">Date of Pitstop</label> <label class="col-sm-2 control-label" for="date">Date of Pitstop</label>
<div class="controls"> <div class="col-sm-10">
<input id="date" name="date" placeholder="" class="input-large" required="" type="date" value='{{ data.last.date }}' /> <input class="form-control" id="date" name="date" placeholder="" required="" type="date" value='{{ data.last.date }}' />
{% if data.error['date'] %} <p class='error'>{{ data.error['date'] }}</p>
<p class='error'>{{ data.error['date'] }}</p>
{% endif %}
</div>
</div>
<!-- Text input-->
<div class="control-group">
<label class="control-label" for="odometer">Odometer</label>
<div class="controls">
<input id="odometer" name="odometer" placeholder="" class="input-large" required="" type="number" value='{{ data.last.odometer }}' />
{% if data.error['odometer'] %}
<p class='error'>{{ data.error['odometer'] }}</p>
{% endif %}
</div> </div>
</div> </div>
<!-- Text input--> <!-- Text input-->
<div class="control-group"> <div class="form-group {% if data.error['odometer'] %}has-error{% endif %}">
<label class="control-label" for="litres">Litres</label> <label class="col-sm-2 control-label" for="odometer">Odometer (km)</label>
<div class="controls"> <div class="col-sm-10">
<input id="litres" name="litres" placeholder="" class="input-large" required="" type="number" value='{{ data.last.litres }}' /> <input class="form-control" id="odometer" name="odometer" placeholder="" type="number" value='{{ data.last.odometer }}' />
{% if data.error['litres'] %} <p class='error'>{{ data.error['odometer'] }}</p>
<p class='error'>{{ data.error['litres'] }}</p> </div>
{% endif %} </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" value='{{ data.last.litres }}' />
<p class='error'>{{ data.error['litres'] }}</p>
</div> </div>
</div> </div>
<!-- Button (Double) --> <!-- Button (Double) -->
<div class="control-group"> <div class="form-group">
<label class="control-label" for="buttonLogId"></label>
<div class="controls"> <div class="controls">
<button id="buttonLogId" name="buttonLogId" class="btn btn-success" onclick="document.getElementById('createPitStop').submit();">Log Pitstop</button> <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> <button id="buttonAbortId" name="buttonAbortId" class="btn btn-warning" onclick="window.location.href='{{ url_for('getPitStops') }}'" type="button" >Abort</button>
</div> </div>
</div> </div>
</fieldset>
</form> </form>
{% endblock %} {% endblock %}

View File

@ -1,7 +1,6 @@
{% extends "layout.html" %} {% extends "layout.html" %}
{% block navigation %} {% block navigation %}
<li><a href='{{ url_for('getPitStops') }}' class="active">Home</a></li>
<li><a href='{{ url_for('createPitStopForm') }}'>Create Pitstop</a></li> <li><a href='{{ url_for('createPitStopForm') }}'>Create Pitstop</a></li>
<li><a href='{{ url_for('getStatistics') }}'>Statistics</a></li> <li><a href='{{ url_for('getStatistics') }}'>Statistics</a></li>
{% endblock %} {% endblock %}

View File

@ -1,7 +1,6 @@
{% extends "layout.html" %} {% extends "layout.html" %}
{% block navigation %} {% block navigation %}
<li><a href='{{ url_for('getPitStops') }}'>Home</a></li>
<li><a href='{{ url_for('createPitStopForm') }}'>Create Pitstop</a></li> <li><a href='{{ url_for('createPitStopForm') }}'>Create Pitstop</a></li>
<li><a href='{{ url_for('getStatistics') }}' class="active">Statistics</a></li> <li><a href='{{ url_for('getStatistics') }}' class="active">Statistics</a></li>
{% endblock %} {% endblock %}