aboutsummaryrefslogtreecommitdiffstats
path: root/ctrack/register/templates
diff options
context:
space:
mode:
authorMatthew Lemon <lemon@matthewlemon.com>2020-10-05 11:50:14 +0100
committerMatthew Lemon <lemon@matthewlemon.com>2020-10-05 11:50:14 +0100
commite63c940dddbae1751fd9655cae5596ae0284d619 (patch)
tree12d02103a0e1c2f87165b9953e52ebc147e0ce1e /ctrack/register/templates
parent22d18014f0d9913abf27c5eac38a727d919608e1 (diff)
Nice deletion confirmation using view.get_success_url for the cancel button
Diffstat (limited to 'ctrack/register/templates')
-rw-r--r--ctrack/register/templates/register/engagementevent_confirm_delete.html28
1 files changed, 24 insertions, 4 deletions
diff --git a/ctrack/register/templates/register/engagementevent_confirm_delete.html b/ctrack/register/templates/register/engagementevent_confirm_delete.html
index 20aec9e..ec61949 100644
--- a/ctrack/register/templates/register/engagementevent_confirm_delete.html
+++ b/ctrack/register/templates/register/engagementevent_confirm_delete.html
@@ -7,8 +7,28 @@
{% load crispy_forms_tags %}
{% block content %}
- <form method="post">{% csrf_token %}
- <p>Are you sure you want to delete "{{ object }}"?</p>
- <input type="submit" value="Confirm">
-</form>
+ <div class="container mt-3">
+ <div class="row">
+ <div class="col-6 offset-md-2 pt-3">
+ <div class="card">
+ <div class="card-body">
+ <h5 class="card-title">Confirm deletion</h5>
+ <div class="card-text">Are you sure you want to delete the event <strong>{{ object.type.descriptor }} | {{ object.short_description }}</strong>?</div>
+ <div class="card-text">
+ <p>This event was created by <strong>{{ object.user }}</strong> - ensure you have their permission.</p>
+ </div>
+ <div class="col p-2">
+ <form method="post">
+ {% csrf_token %}
+ <div class="form-row">
+ <button type="submit" class="btn btn-danger m-1" value="Confirm" id="submit-button">Delete</button>
+ <a href="{{ view.get_success_url }}" class="btn btn-primary m-1">Cancel</a>
+ </div>
+ </form>
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
{% endblock content %}