Google's recaptcha removed. Avoid external dependencies.
This commit is contained in:
parent
e90f8fc53e
commit
72ccc986a4
4 changed files with 7 additions and 8 deletions
2
Gemfile
2
Gemfile
|
|
@ -111,7 +111,7 @@ gem 'devise'
|
||||||
# Font Awesome icons
|
# Font Awesome icons
|
||||||
gem "font-awesome-rails"
|
gem "font-awesome-rails"
|
||||||
|
|
||||||
gem "recaptcha", require: "recaptcha/rails"
|
# gem "recaptcha", require: "recaptcha/rails"
|
||||||
|
|
||||||
gem "sprockets", '3.6.3'
|
gem "sprockets", '3.6.3'
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -182,7 +182,7 @@ class PackagesController < ApplicationController
|
||||||
# Receive an anonymous report from a user to have a screenshot removed.
|
# Receive an anonymous report from a user to have a screenshot removed.
|
||||||
def report_screenshot
|
def report_screenshot
|
||||||
@screenshot = Screenshot.find(params[:id])
|
@screenshot = Screenshot.find(params[:id])
|
||||||
if verify_recaptcha
|
# if verify_recaptcha
|
||||||
@screenshot.delete_reason = params[:delete_reason]
|
@screenshot.delete_reason = params[:delete_reason]
|
||||||
@screenshot.markedfordelete = true
|
@screenshot.markedfordelete = true
|
||||||
if @screenshot.valid?
|
if @screenshot.valid?
|
||||||
|
|
@ -192,7 +192,7 @@ class PackagesController < ApplicationController
|
||||||
errors = @screenshot.errors.to_a.join(' and ')
|
errors = @screenshot.errors.to_a.join(' and ')
|
||||||
flash['alert'] = "Sorry. #{errors}"
|
flash['alert'] = "Sorry. #{errors}"
|
||||||
end
|
end
|
||||||
end
|
# end
|
||||||
redirect_to :back
|
redirect_to :back
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -9,5 +9,4 @@
|
||||||
the screenshot should get removed:
|
the screenshot should get removed:
|
||||||
= form_tag(report_screenshot_path(screenshot.id))
|
= form_tag(report_screenshot_path(screenshot.id))
|
||||||
= text_area_tag 'delete_reason', nil, class: 'input-group-field', maxlength: 100, rows: 3, cols: 50
|
= text_area_tag 'delete_reason', nil, class: 'input-group-field', maxlength: 100, rows: 3, cols: 50
|
||||||
= recaptcha_tags
|
|
||||||
= submit_tag 'Request removal', class: 'button alert'
|
= submit_tag 'Request removal', class: 'button alert'
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
Recaptcha.configure do |config|
|
# Recaptcha.configure do |config|
|
||||||
config.public_key = '6LcliyUTAAAAAIOCkg-c4f4btSEiDJIdwVVixnd2'
|
# config.public_key = '6LcliyUTAAAAAIOCkg-c4f4btSEiDJIdwVVixnd2'
|
||||||
config.private_key = '6LcliyUTAAAAAHEtx8ow3tkKx4-fQ5gTbvKN82B5'
|
# config.private_key = '6LcliyUTAAAAAHEtx8ow3tkKx4-fQ5gTbvKN82B5'
|
||||||
end
|
# end
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue