% edition_mode = (defined? edition_mode) ? edition_mode : false %>
<%= _('If you are a registered user, you can login and be automatically recognized.') %>
<%= _('Please type the two words below') %>
<%= recaptcha_tags(:display => { :theme => 'clean' }, :ajax => true) %> <% button_bar do %> <%= button_to_function :add, _('Confirm'), "return false", :id => "confirm-captcha" %> <%= button_to_function :cancel, _('Cancel'), "noosfero.modal.close()" %> <% end %><%= _('If you are a registered user, you can login and be automatically recognized.') %>
<% end %> <% if !edition_mode && !pass_without_comment_captcha? %> <%= hidden_field_tag(:recaptcha_response_field, nil, :id => nil) %> <%= hidden_field_tag(:recaptcha_challenge_field, nil, :id => nil) %> <% end %> <%= labelled_form_field(_('Title'), f.text_field(:title)) %> <%= required labelled_form_field(_('Enter your comment'), f.text_area(:body, :rows => 5)) %> <%= hidden_field_tag(:confirm, 'false') %> <%= hidden_field_tag(:view, params[:view])%> <%= f.hidden_field(:reply_of_id) %> <%= @plugins.dispatch(:comment_form_extra_contents, local_assigns.merge(:comment => @comment)).collect { |content| instance_exec(&content) }.join("") %> <% button_bar do %> <%= submit_button('add', _('Post comment'), :onclick => "if(check_captcha(this)) { save_comment(this) } else { check_captcha(this, save_comment)};return false;") %> <% if !edition_mode %> <%= button :cancel, _('Cancel'), '', :id => 'cancel-comment' %> <% else %> <%= button :cancel, _('Cancel'), '#', :onclick => "noosfero.modal.close();" %> <% end %> <% end %> <% end %>