diff options
Diffstat (limited to 'src/templates/booking')
-rw-r--r-- | src/templates/booking/booking_calendar.html | 22 | ||||
-rw-r--r-- | src/templates/booking/booking_detail.html | 9 |
2 files changed, 31 insertions, 0 deletions
diff --git a/src/templates/booking/booking_calendar.html b/src/templates/booking/booking_calendar.html index 16f0a4a..52193d5 100644 --- a/src/templates/booking/booking_calendar.html +++ b/src/templates/booking/booking_calendar.html @@ -56,6 +56,28 @@ {% endbuttons %} </form> </div> + <div id="booking_edit_form_div"> + {% bootstrap_form_errors form type='non_fields' %} + <form method="post" action="" class="form" id="bookingeditform"> + {% csrf_token %} + + <div class='input-group' id='starttimeeditpicker'> + {% bootstrap_field form.start addon_after='<span class="glyphicon glyphicon-calendar"></span>' %} + </div> + <div class='input-group' id='endtimeeditpicker'> + {% bootstrap_field form.end addon_after='<span class="glyphicon glyphicon-calendar"></span>' %} + </div> + {% bootstrap_field form.purpose %} + {% bootstrap_field form.installer %} + {% bootstrap_field form.scenario %} + {% bootstrap_field form.reset %} + {% buttons %} + <button type="submit" class="btn btn btn-success"> + Confirm Edit + </button> + {% endbuttons %} + </form> + </div> {% else %} <p>Please <a href="{% url 'account:login' %}"> diff --git a/src/templates/booking/booking_detail.html b/src/templates/booking/booking_detail.html index cb937d3..dd0bf03 100644 --- a/src/templates/booking/booking_detail.html +++ b/src/templates/booking/booking_detail.html @@ -27,3 +27,12 @@ <p> <b>Scenario: </b> {{ booking.scenario }} </p> +{% if user.is_authenticated %} +{% if user.get_username == booking.user.username %} +<p> + <a href="{% url 'booking:edit' booking_id=booking.id resource_id=booking.resource.id %}" class="btn btn btn-success"> + Edit Booking + </a> +</p> +{% endif %} +{% endif %} |