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.haml32
1 files changed, 32 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..12692c2 --- /dev/null +++ b/app/views/comments/_form.html.haml
@@ -0,0 +1,32 @@
1= form_for @comment || blog.comments.new, html: { id: "comment-form" } do |f|
2 = f.hidden_field :reply_to_id
3 %fieldset#comment-body-field
4 %blockquote.bubble.rounded.bottom
5 #comment-reply-msg
6 = link_to (image_tag "cross.png"), "#", class: "comment-reply-cancel"
7 Replying to comment by
8 = succeed ":" do
9 %span.comment-reply-author
10 = f.label :body
11 = f.text_area :body
12 %cite.bubble Feel free to post a comment! You may use Markdown.
13 - if @comment and @comment.errors.any?
14 %ul#form-errors
15 - @comment.errors.full_messages.each do |msg|
16 %li= msg
17 %fieldset#comment-other-fields
18 .comment-name-field.comment-field
19 .comment-field-label= f.label :username
20 .comment-field-input= f.text_field :username
21 .comment-email-field.comment-field
22 .comment-field-label= f.label :email
23 .comment-field-input= f.text_field :email, type: :email
24 .comment-website-field.comment-field
25 .comment-field-label= f.label :website, "Website (Optional)"
26 .comment-field-input= f.text_field :website, type: :url
27 .comment-website-field.comment-field
28 .comment-field-label
29 .comment-field-input= recaptcha_tags
30 .comment-submit-button.comment-field
31 .comment-field-label
32 .comment-field-input= f.submit "Post"