about summary refs log tree commit diff stats
path: root/app/views/comments/_form.html.haml
diff options
context:
space:
mode:
Diffstat (limited to 'app/views/comments/_form.html.haml')
-rw-r--r--app/views/comments/_form.html.haml23
1 files changed, 23 insertions, 0 deletions
diff --git a/app/views/comments/_form.html.haml b/app/views/comments/_form.html.haml new file mode 100644 index 0000000..f6df807 --- /dev/null +++ b/app/views/comments/_form.html.haml
@@ -0,0 +1,23 @@
1= form_for @comment || blog.comments.new, html: { id: "comment-form" } do |f|
2 %fieldset#comment-body-field
3 %blockquote.bubble.rounded.bottom
4 = f.label :body
5 = f.text_area :body
6 %cite.bubble Feel free to post a comment! You may use Markdown.
7 - if @comment and @comment.errors.any?
8 %ul#form-errors
9 - @comment.errors.full_messages.each do |msg|
10 %li= msg
11 %fieldset#comment-other-fields
12 .comment-name-field.comment-field
13 .comment-field-label= f.label :username
14 .comment-field-input= f.text_field :username
15 .comment-email-field.comment-field
16 .comment-field-label= f.label :email
17 .comment-field-input= f.text_field :email, type: :email
18 .comment-website-field.comment-field
19 .comment-field-label= f.label :website, "Website (Optional)"
20 .comment-field-input= f.text_field :website, type: :url
21 .comment-submit-button.comment-field
22 .comment-field-label
23 .comment-field-input= f.submit "Post"