aboutsummaryrefslogtreecommitdiffstats
path: root/src/templates/booking/booking_detail.html
diff options
context:
space:
mode:
authorParker Berberian <pberberian@iol.unh.edu>2018-02-19 21:17:12 +0000
committerGerrit Code Review <gerrit@opnfv.org>2018-02-19 21:17:12 +0000
commit5aa91201db4fee539a60f2f9e798593448d42af7 (patch)
tree54946b78e000e2759b84e5d651b3cdfe13f61822 /src/templates/booking/booking_detail.html
parent907b5d1be1657301e4701d0d08235db16e7d31de (diff)
parente5c2305cea0d7359dce6fc04fb23ad032735b1fd (diff)
Merge "Provide Interface for Booking Deletion"
Diffstat (limited to 'src/templates/booking/booking_detail.html')
-rw-r--r--src/templates/booking/booking_detail.html34
1 files changed, 33 insertions, 1 deletions
diff --git a/src/templates/booking/booking_detail.html b/src/templates/booking/booking_detail.html
index dd0bf03..c88cd84 100644
--- a/src/templates/booking/booking_detail.html
+++ b/src/templates/booking/booking_detail.html
@@ -1,5 +1,22 @@
{% load jira_filters %}
+<script type="text/javascript">
+ function deleteClick(id) {
+ var booking_delete_url = booking_delete_prefix + id
+ $.ajax({
+ url: booking_delete_url,
+ type: 'get',
+ success: function (data) {
+ $('#booking_delete_content').html(data);
+ },
+ failure: function (data) {
+ alert('Error finding that booking');
+ }
+ });
+ $('#booking_delete_modal').modal('show');
+ }
+</script>
+
<p>
<b>Resource: </b>
<a href="{{ booking.resource.url }}">
@@ -33,6 +50,21 @@
<a href="{% url 'booking:edit' booking_id=booking.id resource_id=booking.resource.id %}" class="btn btn btn-success">
Edit Booking
</a>
+ <a href="javascript:deleteClick({{ booking.id }})" class="btn btn btn-danger">
+ Delete Booking
+ </a>
+ <div id="booking_delete_modal" class="modal fade" role="dialog">
+ <div class="modal-dialog">
+ <div class="modal-content">
+ <div class="modal-header">
+ <button type="button" class="close" data-dismiss="modal">&times;</button>
+ <h4 class="modal-title">Delete Booking</h4>
+ </div>
+ <div class="modal-body" id="booking_delete_content">
+ </div>
+ </div>
+ </div>
+ </div>
</p>
{% endif %}
-{% endif %}
+{% endif %} \ No newline at end of file