Skip to content

Commit

Permalink
Prompt user on attachment deletion. Fixes kiwitcms#867
Browse files Browse the repository at this point in the history
  • Loading branch information
xxm0703 committed Mar 23, 2019
1 parent e854618 commit d9dc4f0
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion tcms/templates/attachments/delete_link.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
{% load i18n %}
{% load static %}
{% trans 'Are you sure you want to delete this attachment?' as prompt_message %}

<link rel="stylesheet" href="{% static 'patternfly/dist/css/patternfly-additions.min.css' %}">
{% if delete_url %}<a class="delete-attachment" href="{{ delete_url }}?next={{ next }}"><span class="pficon-error-circle-o"></span></a>{% endif %}
{% if delete_url %}<a class="delete-attachment"
onclick="return confirm('{{ prompt_message }}')"
href="{{ delete_url }}?next={{ next }}">
<span class="pficon-error-circle-o"></span>
</a>{% endif %}

0 comments on commit d9dc4f0

Please sign in to comment.