ref: master
app/views/content_viewer/_comment_form.html.erb
<% if @comment && @comment.errors.any? && @comment.reply_of_id.blank? %> <%= error_messages_for :comment %> <% end %> <% @form_div ||= 'closed' %> <%= link_to(_('Post a comment'), '#', :class => 'display-comment-form') if display_link %> <% unless pass_without_comment_captcha? %> <%= _('Please type the two words below') %> <%= recaptcha_tags(:display => { :theme => 'clean' }, :ajax => true, :ssl => true) %> <% button_bar do %> <%= button_to_function :add, _('Confirm'), "return false", :id => "confirm-captcha" %> <%= button_to_function :cancel, _('Cancel'), "noosfero.modal.close()" %> <% end %> <% end %> <%= form_tag( url, { :class => 'comment_form' } ) do %> <%= required_fields_message %> <% unless logged_in? %> <%= required labelled_form_field(_('Name'), text_field(:comment, :name)) %> <%= required labelled_form_field(_('e-mail'), text_field(:comment, :email)) %> <%= _('If you are a registered user, you can login and be automatically recognized.') %> <% end %> <% unless 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'), text_field(:comment, :title)) %> <%= required labelled_form_field(_('Enter your comment'), text_area(:comment, :body, :rows => 5)) %> <%= hidden_field_tag(:confirm, 'false') %> <%= hidden_field_tag(:view, params[:view])%> <%= button_bar do %> <%= submit_button('add', _('Post comment'), :onclick => "submit_comment_form(this); return false") %> <% if cancel_triggers_hide %> <%= button :cancel, _('Cancel'), '', :id => 'cancel-comment' %> <% else %> <%= button('cancel', _('Cancel'), {:action => 'view_page', :profile => profile.identifier, :page => @comment.article.explode_path})%> <% end %> <% end %> <% end %> <%= javascript_include_tag 'comments' %>
<%= _('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, :ssl => 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 %> <% unless 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'), text_field(:comment, :title)) %> <%= required labelled_form_field(_('Enter your comment'), text_area(:comment, :body, :rows => 5)) %> <%= hidden_field_tag(:confirm, 'false') %> <%= hidden_field_tag(:view, params[:view])%> <%= button_bar do %> <%= submit_button('add', _('Post comment'), :onclick => "submit_comment_form(this); return false") %> <% if cancel_triggers_hide %> <%= button :cancel, _('Cancel'), '', :id => 'cancel-comment' %> <% else %> <%= button('cancel', _('Cancel'), {:action => 'view_page', :profile => profile.identifier, :page => @comment.article.explode_path})%> <% end %> <% end %> <% end %>