Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suggesting some changes to the bot protections forms #2

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/lib/three_scale/bot_protection.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

module ThreeScale
module BotProtection
LEVELS = [['None', :none], ['reCAPTCHA', :captcha]].freeze
LEVELS = [['None', :none], ['reCAPTCHA v3', :captcha]].freeze
end
end

2 changes: 1 addition & 1 deletion app/views/provider/admin/bot_protections/_form.html.slim
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
= semantic_form_for settings, url: url, html: {:id => 'bot-protection-settings' } do |form|
= form.inputs t('.title', portal: portal) do
= form.inputs selector_label do
= form.input field,
label: false,
hint: t("sites.spam_protections.edit.captcha_hint_#{Recaptcha.captcha_configured?.to_s}"),
Expand Down
2 changes: 1 addition & 1 deletion app/views/provider/admin/bot_protections/edit.html.slim
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
- content_for :page_header_title, 'Bot Protection'
- content_for :page_header_body, t('.description')

= render partial: 'form', locals: { url: provider_admin_bot_protection_path, settings: @settings, field: :admin_bot_protection_level, portal: 'Admin' }
= render partial: 'form', locals: { url: provider_admin_bot_protection_path, settings: @settings, field: :admin_bot_protection_level, selector_label: t('.selector_label') }
2 changes: 1 addition & 1 deletion app/views/sites/spam_protections/edit.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
<% content_for :page_header_title, 'Bot Protection' %>
<% content_for :page_header_body, t('.description') %>

<%= render partial: 'provider/admin/bot_protections/form', locals: { url: admin_site_spam_protection_path, settings: @settings, field: :spam_protection_level, portal: 'Development' } %>
<%= render partial: 'provider/admin/bot_protections/form', locals: { url: admin_site_spam_protection_path, settings: @settings, field: :spam_protection_level, selector_label: t('.selector_label') } %>
6 changes: 4 additions & 2 deletions config/locales/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -454,7 +454,8 @@ en:
form:
title: Protection against bots on %{portal} portal
edit:
description: Bot protection helps authenticate and block malicious clients, and enables you to avoid account brute force when logging in 3scale management admin portal.
selector_label: Protection against bots on the admin portal
description: Bot protection uses Google reCAPTCHA to detect bots and prevent malicious attacks on the admin portal.
keys:
create:
success: A new key has been added.
Expand Down Expand Up @@ -614,7 +615,8 @@ en:
sites:
spam_protections:
edit:
description: Bot protection helps authenticate and block malicious clients, and enables you to avoid account brute force when logging in 3scale management developer portal.
selector_label: Protection against bots on the developer portal
description: Bot protection uses Google reCAPTCHA to detect bots and prevent malicious attacks on the developer portal.
captcha_hint_false: 'reCAPTCHA has not been configured correctly, bot protection cannot be enabled.'
captcha_hint_true: "reCAPTCHA v3 will invisibly verify interactions to detect bots."
usage_rules:
Expand Down