Omit hCaptcha if it is disabled
This commit is contained in:
parent
7cac93ad4e
commit
984976a2f7
|
@ -1,6 +1,6 @@
|
|||
class User::RegistrationsController < Devise::RegistrationsController
|
||||
def create
|
||||
if verify_hcaptcha(model: resource)
|
||||
if !APP_CONFIG.dig(:hcaptcha, :enabled) || verify_hcaptcha(model: resource)
|
||||
super
|
||||
else
|
||||
respond_with_navigational(resource){ redirect_to new_user_registration_path }
|
||||
|
|
|
@ -14,7 +14,8 @@
|
|||
= f.password_field :password, autocomplete: :off, label: t('views.settings.account.password')
|
||||
= f.password_field :password_confirmation, autocomplete: :off, label: t('views.settings.account.password_confirm')
|
||||
|
||||
= hcaptcha_tags
|
||||
- if APP_CONFIG.dig(:hcaptcha, :enabled)
|
||||
= hcaptcha_tags
|
||||
|
||||
%p= raw t('views.sessions.info', terms: link_to(t('views.general.terms'), terms_path))
|
||||
= f.submit 'Sign up', class: 'btn btn-primary mb-3'
|
||||
|
|
Loading…
Reference in New Issue