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