<%= form_for [@support_thread, @support_post], url: (@support_post.persisted? ? help_center.support_thread_support_post_path(@support_thread, @support_post) : help_center.support_thread_support_posts_path(@support_thread)), html: { data: { behavior: "comment-form" } } do |f| %> <% if @support_post.errors.any? %>

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

<% end %>
<%= f.text_area :body, placeholder: t('add_a_comment'), rows: 8, class: "form-control simplemde", data: { behavior: "comment-body" } %>
<%# Describe text formatting options here with a link %> <%#= link_to "Parsed with Markdown", "https://guides.github.com/features/mastering-markdown/", target: "_blank" %>
<%= f.button "#{f.object.new_record? ? t('comment') : t('update_comment') }", class: "btn btn-primary", data: {disable_with: " #{t('saving_comment')}"} %>
<% end %>