Commit 277adf7d7820826fcfecd4d732e5646ec4f21033

Authored by Aurélio A. Heckert
1 parent 8195b993

Admin don't need to fill a captcha to report abuse

closes ActionItem2387
app/controllers/public/profile_controller.rb
... ... @@ -278,7 +278,7 @@ class ProfileController < PublicController
278 278 end
279 279  
280 280 def register_report
281   - if !verify_recaptcha
  281 + unless user.is_admin? || verify_recaptcha
282 282 render :text => {
283 283 :ok => false,
284 284 :error => {
... ...
app/views/profile/report_abuse.html.erb
... ... @@ -4,7 +4,9 @@
4 4 <%= hidden_field_tag(:content_type, params[:content_type]) %>
5 5 <%= hidden_field_tag(:content_id, params[:content_id]) %>
6 6  
7   - <p><%= recaptcha_tags :ajax => true, :display => {:theme => 'clean'} %> </p>
  7 + <% unless user.is_admin? %>
  8 + <p><%= recaptcha_tags :ajax => true, :display => {:theme => 'clean'} %> </p>
  9 + <% end %>
8 10  
9 11 <%= submit_button(:send, _('Report profile'), :style => 'float: left; cursor: pointer;', :id => 'report-abuse-submit-button', :onclick => "jQuery('#form-submit-loading').show()") %>
10 12 <%= button(:cancel, _('Cancel'), {}, :style => 'float: left; padding-top: 0px; padding-bottom: 0px;', :onclick => 'jQuery.colorbox.close(); return false;')%>
... ...