<% if @comment.errors.any? %>

<%= pluralize(@comment.errors.count, "error") %> prohibited this comment from being saved:





<% end %> <%= form_for(@comment, authenticity_token: false) do |f| %> <% unless @comment.persisted? %> <%= f.hidden_field :commentable_id, value: commentable.id %> <%= f.hidden_field :commentable_type, value: commentable_type %> <%= f.hidden_field :parent_id, value: @parent_comment.id if @parent_comment %> <% end %>
<%= f.text_area :body_markdown, placeholder: "Add to the discussion", onfocus: "handleFocus(event)", onblur: "handleBlur(event)", onkeyup: "handleKeyUp(event)", id: "text-area", readonly: !user_signed_in?, autofocus: @comment.persisted?, required: true %>
<% if user_signed_in? %>
<% end %>
<%= f.submit "SUBMIT", id: "submit-button", onclick:"validateField(event)", class:"comment-action-button" %>
<% end %>