mirror of
https://github.com/Growstuff/growstuff.git
synced 2026-02-06 15:41:09 -05:00
19 lines
682 B
Plaintext
19 lines
682 B
Plaintext
= form_for(@comment, :html => {:class => "form-horizontal", :role => "form"}) do |f|
|
|
- if @comment.errors.any?
|
|
#error_explanation
|
|
%h2= "#{pluralize(@comment.errors.size, "error")} prohibited this comment from being saved:"
|
|
%ul
|
|
- @comment.errors.full_messages.each do |msg|
|
|
%li= msg
|
|
|
|
.form-group
|
|
= f.label :body, "Your comment:"
|
|
= f.text_area :body, :rows => 6, :class => 'form-control', :autofocus => 'autofocus'
|
|
%span.help-block
|
|
= render :partial => "shared/markdown_help"
|
|
.actions
|
|
= f.submit 'Post comment', :class => 'btn btn-primary'
|
|
- if defined?(@post)
|
|
.field
|
|
= f.hidden_field :post_id, :value => @post.id
|