summaryrefslogtreecommitdiffstats
path: root/dashboard/src/templates
diff options
context:
space:
mode:
authorSawyer Bergeron <sbergeron@iol.unh.edu>2018-01-05 16:07:13 -0500
committerSawyer Bergeron <sbergeron@iol.unh.edu>2018-01-09 15:03:34 -0500
commitc32479489db670904579a580a918f3513581fda9 (patch)
tree9f4778cbd48ce5bf83c86830e7e5117931c73a47 /dashboard/src/templates
parentdc387ea4307eeb4c676c796ec1380d20564e5ef9 (diff)
Implement Booking Modification Interface
Jira: PHAROS-330 Users can change start date if it has not already occurred, and can change end date, purpose, and both installer and scenario. Standard checks apply similar to when initially creating a booking. Change-Id: Ibae7fe91a58bd6e0741db065265c05c3823bdc27 Signed-off-by: Sawyer Bergeron <sbergeron@iol.unh.edu>
Diffstat (limited to 'dashboard/src/templates')
-rw-r--r--dashboard/src/templates/booking/booking_calendar.html22
-rw-r--r--dashboard/src/templates/booking/booking_detail.html9
2 files changed, 31 insertions, 0 deletions
diff --git a/dashboard/src/templates/booking/booking_calendar.html b/dashboard/src/templates/booking/booking_calendar.html
index 16f0a4a..52193d5 100644
--- a/dashboard/src/templates/booking/booking_calendar.html
+++ b/dashboard/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/dashboard/src/templates/booking/booking_detail.html b/dashboard/src/templates/booking/booking_detail.html
index cb937d3..dd0bf03 100644
--- a/dashboard/src/templates/booking/booking_detail.html
+++ b/dashboard/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 %}