Skip to content

Commit 3ce758d

Browse files
committed
Add confirmation for destructive action
1 parent d6301aa commit 3ce758d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/views/application/_draft_present_alert.html.erb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22
<div class="alert draft-present-alert">
33
Data was restored from an incomplete draft.
44

5-
If you want, you can <%= link_to "discard the draft and start over", discard_draft_url, class: "discard-draft-link", method: :put, remote: true %>.
5+
If you want, you can <%= link_to "discard the draft and start over", discard_draft_url, class: "discard-draft-link", method: :put, remote: true, data: { confirm: "Are you sure you want to discard this draft and start over?" } %>.
66
</div>
77
<%- end %>

0 commit comments

Comments
 (0)