Fix it being possible for users to delete or undelete their own forum posts and topics, even if they were deleted by a mod.
26 lines
1.2 KiB
Plaintext
26 lines
1.2 KiB
Plaintext
<%= error_messages_for("forum_topic") %>
|
|
|
|
<div id="form-content">
|
|
<%= edit_form_for(forum_topic) do |f| %>
|
|
<%= f.input :title %>
|
|
|
|
<div class="input">
|
|
<label for="forum_topic_category_id">Category</label>
|
|
<%= forum_topic_category_select("forum_topic", "category_id") %>
|
|
</div>
|
|
|
|
<%= f.simple_fields_for :original_post do |pf| %>
|
|
<%= dtext_field "forum_post", "body", :classes => "autocomplete-mentions", :input_name => "forum_topic[original_post_attributes][body]", :value => forum_topic.original_post.body, :input_id => "forum_post_body_for_#{forum_topic.original_post.id}", :preview_id => "dtext-preview-for-#{forum_topic.original_post.id}" %>
|
|
<% end %>
|
|
|
|
<% if policy(forum_topic).moderate? %>
|
|
<%= f.input :min_level, :include_blank => false, :collection => available_min_user_levels %>
|
|
<%= f.input :is_sticky, :label => "Sticky" %>
|
|
<%= f.input :is_locked, :label => "Locked" %>
|
|
<% end %>
|
|
|
|
<%= f.button :submit, "Submit" %>
|
|
<%= dtext_preview_button "forum_post", "body", :input_id => "forum_post_body_for_#{forum_topic.original_post.id}", :preview_id => "dtext-preview-for-#{forum_topic.original_post.id}" %>
|
|
<% end %>
|
|
</div>
|