Skip to content

Commit

Permalink
Add Confirmation Before Deleting Task (#113)
Browse files Browse the repository at this point in the history
  • Loading branch information
1hanzla100 authored Mar 21, 2021
1 parent 5e0fb50 commit 1762fe7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion todo/templates/todo/task_detail.html
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ <h3 class="card-title">{{ task.title }}</h3>
<form method="post" action="{% url "todo:delete_task" task.id %}" role="form" class="d-inline">
{% csrf_token %}
<div style="display:inline;">
<button class="btn btn-danger btn-sm" type="submit" name="submit_delete">
<button class="btn btn-danger btn-sm" type="submit" onclick="return confirm('Are you sure to delete task?');" name="submit_delete">
Delete
</button>
</div>
Expand Down

0 comments on commit 1762fe7

Please sign in to comment.