Files
danbooru/app/views/posts/partials/show/_delete_dialog.html.erb
evazion bca1f122d0 posts: rework post deletion to use dialog box.
Rework post deletion from using a separate page to using a dialog box,
like flagging.

* Add `DELETE /posts/:id` endpoint.
* Remove `POST /moderator/post/posts/:id/delete` endpoint.
2020-08-03 20:21:28 -05:00

10 lines
428 B
Plaintext

<div class="delete-post-dialog-body">
<%= edit_form_for(post, method: :delete, remote: true) do |f| %>
<input type="hidden" name="commit" value="Delete">
<%= f.input :reason, as: :dtext, inline: true, input_html: { value: "" } %>
<% if post.parent_id.present? %>
<%= f.input :move_favorites, label: "Move favorites to parent", as: :boolean, input_html: { checked: false } %>
<% end %>
<% end %>
</div>