about summary refs log tree commit diff stats
path: root/app/views/comments/_form.html.haml
blob: 13a0903c6c0fc0605a8c6cadb28f7bfcd9c776d4 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
= form_for @comment || blog.comments.new, html: { id: "comment-form" } do |f|
  = f.hidden_field :reply_to_id
  %fieldset#comment-body-field
    %blockquote.bubble.rounded.bottom
      #comment-reply-msg
        = link_to (image_tag "cross.png"), "#", class: "comment-reply-cancel"
        Replying to comment by
        = succeed ":" do
          %span.comment-reply-author
      = f.label :body
      = f.text_area :body
    %cite.bubble Feel free to post a comment! You may use Markdown.
  - if @comment and @comment.errors.any?
    %ul#form-errors
      - @comment.errors.full_messages.each do |msg|
        %li= msg
  %fieldset#comment-other-fields
    .comment-name-field.comment-field
      .comment-field-label= f.label :username
      .comment-field-input= f.text_field :username
    .comment-email-field.comment-field
      .comment-field-label= f.label :email
      .comment-field-input= f.text_field :email, type: :email
    .comment-website-field.comment-field
      .comment-field-label= f.label :website, "Website (Optional)"
      .comment-field-input= f.text_field :website, type: :url
    .comment-submit-button.comment-field
      .comment-field-label
      .comment-field-input= f.submit "Post"