/wiki_pages: add confirmation to delete option in subnav menu.
This commit is contained in:
@@ -17,9 +17,9 @@
|
||||
<%= subnav_link_to "Edit", edit_wiki_page_path(@wiki_page.id), "data-shortcut": "e" %>
|
||||
|
||||
<% if @wiki_page.is_deleted? %>
|
||||
<%= subnav_link_to "Undelete", wiki_page_path(@wiki_page.id), remote: true, method: :put, "data-params": "wiki_page[is_deleted]=false", "data-shortcut": "shift+d" %>
|
||||
<%= subnav_link_to "Undelete", wiki_page_path(@wiki_page.id), remote: true, method: :put, "data-params": "wiki_page[is_deleted]=false", "data-shortcut": "shift+d", "data-confirm": "Are you sure you want to undelete this wiki?" %>
|
||||
<% else %>
|
||||
<%= subnav_link_to "Delete", wiki_page_path(@wiki_page.id), remote: true, method: :put, "data-params": "wiki_page[is_deleted]=true", "data-shortcut": "shift+d" %>
|
||||
<%= subnav_link_to "Delete", wiki_page_path(@wiki_page.id), remote: true, method: :put, "data-params": "wiki_page[is_deleted]=true", "data-shortcut": "shift+d", "data-confirm": "Are you sure you want to delete this wiki?" %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% elsif @wiki_page_version %>
|
||||
|
||||
Reference in New Issue
Block a user