<%= error_messages_for :comment %> <%= edit_form_for(comment, html: { style: ("display: none;" if local_assigns[:hidden]), class: "edit_comment" }) do |f| %> <% if comment.new_record? %> <%= f.hidden_field :post_id %> <% end %> <%= dtext_field "comment", "body", classes: "autocomplete-mentions", value: comment.body, input_id: "comment_body_for_#{comment.id}", preview_id: "dtext-preview-for-#{comment.id}", hint: link_to_wiki("Comment rules", "howto:comment").html_safe %> <%= f.button :submit, "Submit" %> <%= dtext_preview_button "comment", "body", :input_id => "comment_body_for_#{comment.id}", :preview_id => "dtext-preview-for-#{comment.id}" %> <% if comment.new_record? %> <%= f.input :do_not_bump_post, :label => "No bump" %> <% end %> <% if policy(comment).can_sticky_comment? %> <%= f.input :is_sticky, :label => "Post as moderator", :for => "comment_is_sticky" %> <% end %> <% end %>