Files
danbooru/app/views/comments/_form.html.erb
2017-09-14 16:56:40 -07:00

15 lines
820 B
Plaintext

<%= error_messages_for :comment %>
<%= simple_form_for(comment, :html => {:class => "edit_comment"}) do |f| %>
<%= f.hidden_field :post_id %>
<%= dtext_field "comment", "body", :classes => "autocomplete-mentions", :value => comment.body, :input_id => "comment_body_for_#{comment.id}", :preview_id => "dtext-preview-for-#{comment.id}" %>
<%= f.button :submit, "Submit", :data => { :disable_with => "Submitting..." } %>
<%= 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 CurrentUser.is_moderator? %>
<%= f.input :is_sticky, :label => "Post as moderator", :for => "comment_is_sticky" %>
<% end %>
<% end %>