Skip to content

Commit

Permalink
UI designed for find bus template. Cahnges merged with parent branche…
Browse files Browse the repository at this point in the history
…d and committed
  • Loading branch information
jameskomo committed Sep 7, 2019
1 parent c0e4b4f commit ca77d0f
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 47 deletions.
40 changes: 18 additions & 22 deletions myapp/templates/myapp/booklist.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
{% extends 'myapp/base.html' %}
{% load crispy_forms_tags %}
{% block content %}
<h3>{{msg}}</h3>
<h2>Buses Booked</h2>
<h2>Buses Booked/Cancelled</h2>
<table class="table table-striped">
<thead>
<td>BOOKING ID</td>
Expand Down Expand Up @@ -35,25 +36,20 @@ <h2>Buses Booked</h2>
</tr>
{% endfor %}
</table>
<form action="{% url 'cancellings' %}" method="post">
<h3>Choose bus to Cancel</h3>
{% csrf_token %}
<div class="col-auto">
<label for="example-email-input" class="col-2 col-form-label">Bus ID</label>
<div class="col-5">
<input name='bus_id' class="form-control" type="number" id="example-email-input">
</div>
<div class="content-section">
<form action="{% url 'cancellings' %}" method="post">
{% csrf_token %}
<fieldset class="form-group">
<legend class="border-bottom mb-4">Cancel Booking</legend>
{{ form|crispy }}
</fieldset>
<div>
<input name='bus_id' class="form-control" type="number" id="example-email-input" placeholder="Enter ID of the Bus to Cancel from table above">
</div>
<div class="form-group">
<button class="btn btn-outline-info" type="submit">Cancel</button>
</div>
{{error}}
</form>
</div>

<br>
<br>
<div>
<button type="submit" class="btn btn-primary float-left">Cancel bus</button>
</div>


{{error}}

</form>

{% endblock %}
{% endblock content %}
46 changes: 21 additions & 25 deletions myapp/templates/myapp/list.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{% extends 'myapp/base.html' %}
{% load crispy_forms_tags %}
{% block content %}
<h3>{{msg}}</h3>
<h2>List of buses</h2>
Expand Down Expand Up @@ -32,30 +33,25 @@ <h2>List of buses</h2>
</tr>
{% endfor %}
</table>
<form action="{% url 'bookings' %}" method="post">
<h3>Choose bus to book</h3>
{% csrf_token %}
<div class="col-auto">
<label for="example-email-input" class="col-2 col-form-label">Bus ID</label>
<div class="col-5">
<input name='bus_id' class="form-control" type="number" id="example-email-input">
</div>
</div>
<div class="col=auto">
<label for="example-email-input" class="col-2 col-form-label">Number of seats</label>
<div class="col-5">
<input name='no_seats' class="form-control" type="number">
</div>
</div>
<br>
<br>
<div>
<button type="submit" class="btn btn-primary float-left">Book bus</button>
</div>


{{error}}

</form>

<div class="content-section">
<form action="{% url 'bookings' %}" method="post">
{% csrf_token %}
<fieldset class="form-group">
<legend class="border-bottom mb-4">Bus Booking</legend>
{{ form|crispy }}
</fieldset>
<div>
<input name='bus_id' class="form-control" type="number" id="example-email-input" placeholder="Enter ID of the Bus to Book">
</div>
<div>
<input name='no_seats' class="form-control" type="number" placeholder="Enter No of Seats to Book Here">
</div>
<br>
<div class="form-group">
<button class="btn btn-outline-info" type="submit">Book</button>
</div>
{{error}}
</form>
</div>
{% endblock %}

0 comments on commit ca77d0f

Please sign in to comment.