<% form_remote_tag :url      => @article.comment_url,
                    :position => :bottom,
                    :update   => {:success => 'commentList'},
                    :loading  => "loading()",
                    :complete => "complete(request)",
                    :failure  => "failure(request)",
                    :html     => {:id => 'commentform', :class => 'comments' } \
    do %>

<div id="preview" style="display:none"></div>

<div id="respond" class="post">
	<h2 class="title"><%= _("Leave a comment")%></h2>

  <p>
		<%= text_field "comment", "author" %> 
		<label for="comment_author"><%= _("Name %s", content_tag(:small, '('+_('required')+')' ))%></label>
  </p>

  <p>
		<%= text_field "comment", "email" %>
		<label for="comment_email"><%= _("Email")%> <%= content_tag('small', "(#{link_to('gravatar', 'http://gravatar.com')} "+ _("enabled") + ")") if this_blog.use_gravatar %> <small>(<%= _("never displayed") %>)</small></label>
	</p>
	<p><%= text_field "comment", "url" %>
		<label><%= _("Website")%></label>
	</p>

  <p>
    <label>
      <%= _("Comments")%>:
      <%= content_tag('small', link_to(_("Textile enabled"), "http://hobix.com/textile/")) if this_blog.comment_text_filter.include? 'textile' %>
      <%= content_tag('small', link_to(_("Markdown enabled"), "http://daringfireball.net/projects/markdown/")) if this_blog.comment_text_filter.include? 'markdown' %>
      <br />
      <%= text_area 'comment', 'body', :rows => 10 %>
    </label>
  </p>

  <p>
    <%= submit_to_remote('preview', _('Preview') + '!',
                         :update => 'preview',
                         :complete => "Element.show('preview')",
                         :url    => @article.preview_comment_url,
												 :html => {:class => 'submit'}) %>
    <%= submit_tag _('Submit'), :id => 'form-submit-button', :class => 'submit', :onclick => "$('commentform').onsubmit();this.disabled=true;Element.hide('preview');return false;" %>
    <%= image_tag '/images/theme/spinner.gif', :id => 'comment_loading', :style => 'display:none' %>
  </p>
</div>
<% end %>
