% comment_form_id = 'comment_form'+ rand(9999).to_s %> <% focus_on = logged_in? ? 'title' : 'name' %> <%= error_messages_for :comment %> <% @form_div ||= 'closed' %>
<%= _('If you are a registered user, you can login and be automatically recognized.') %>
<%= _('Post a comment') %>
<% form_tag( {}, { :id => comment_form_id } ) do %> <% unless logged_in? %> <%= labelled_form_field(_('Name'), text_field(:comment, :name)) %> <%= labelled_form_field(_('e-mail'), text_field(:comment, :email)) %> <%= icaptcha_field() %><%= _('If you are a registered user, you can login and be automatically recognized.') %>
<% end %> <%= labelled_form_field(_('Title'), text_field(:comment, :title)) %> <%= labelled_form_field(_('Enter your comment'), text_area(:comment, :body, :rows => 5)) %> <% button_bar do %> <%= submit_button('add', _('Post comment')) %> <% end %> <% end %>