about summary refs log tree commit diff
path: root/app/views
diff options
context:
space:
mode:
authorClaire <claire.github-309c@sitedethib.com>2022-01-26 00:13:24 +0100
committerGitHub <noreply@github.com>2022-01-26 00:13:24 +0100
commit129bc429797452f984551b87f753222e824ec3ca (patch)
tree3b4b0bcfff51232ec9dd0d05a9a053194877ffa7 /app/views
parente58e0eb9aa375b1107b207e8229a2142c4edc0b8 (diff)
parentb7cf3941b3783220e6b3bc9a6d3975ceecdc64cb (diff)
Merge pull request #1665 from ClearlyClaire/glitch-soc/features/hcaptcha
Add optional hCaptcha support
Diffstat (limited to 'app/views')
-rw-r--r--app/views/admin/settings/edit.html.haml5
-rw-r--r--app/views/auth/confirmations/captcha.html.haml11
2 files changed, 15 insertions, 1 deletions
diff --git a/app/views/admin/settings/edit.html.haml b/app/views/admin/settings/edit.html.haml
index b9daae8f0..49b03a9e3 100644
--- a/app/views/admin/settings/edit.html.haml
+++ b/app/views/admin/settings/edit.html.haml
@@ -42,7 +42,10 @@
 
   .fields-group
     = f.input :require_invite_text, as: :boolean, wrapper: :with_label, label: t('admin.settings.registrations.require_invite_text.title'), hint: t('admin.settings.registrations.require_invite_text.desc_html'), disabled: !approved_registrations?
-  .fields-group
+
+  - if captcha_available?
+    .fields-group
+      = f.input :captcha_enabled, as: :boolean, wrapper: :with_label, label: t('admin.settings.captcha_enabled.title'), hint: t('admin.settings.captcha_enabled.desc_html')
 
   %hr.spacer/
 
diff --git a/app/views/auth/confirmations/captcha.html.haml b/app/views/auth/confirmations/captcha.html.haml
new file mode 100644
index 000000000..0f7cf9c59
--- /dev/null
+++ b/app/views/auth/confirmations/captcha.html.haml
@@ -0,0 +1,11 @@
+- content_for :page_title do
+  = t('auth.confirm_captcha')
+
+= form_tag auth_captcha_confirmation_url, method: 'POST', class: 'simple_form' do
+  = hidden_field_tag :confirmation_token, params[:confirmation_token]
+
+  .field-group
+    = render_captcha
+
+  .actions
+    %button.button= t('challenge.continue')