Added an 'are you sure' message to the delete button
authorSverre Rabbelier <srabbelier@gmail.com>
Sat, 21 Feb 2009 23:35:58 +0000
changeset 1448 abb676cb0094
parent 1447 5e729070dc60
child 1449 9d2e46122b36
Added an 'are you sure' message to the delete button Patch by: Sverre Rabbelier
app/soc/templates/soc/models/edit.html
--- a/app/soc/templates/soc/models/edit.html	Sat Feb 21 23:35:29 2009 +0000
+++ b/app/soc/templates/soc/models/edit.html	Sat Feb 21 23:35:58 2009 +0000
@@ -61,7 +61,12 @@
    {% if entity %}
    {% block delete_button %}
    <td>
-    <input type="button" onclick="location.href='/{{ entity_type_url|lower }}/delete/{{ entity_suffix }}'" value="Delete"/>
+
+   <input type="submit" class="button" value="Delete"
+    onclick="if(confirm('Are you sure you want to delete this {{ entity_type }}?')) {
+                location.href='/{{ entity_type_url|lower }}/delete/{{ entity_suffix }}'
+                };"/>
+
    </td>
    {% endblock %}
 {% if export_link %}