diff --git a/client/components/forms/components/CaptchaInput.vue b/client/components/forms/components/CaptchaInput.vue index d38647f3..7b2ab978 100644 --- a/client/components/forms/components/CaptchaInput.vue +++ b/client/components/forms/components/CaptchaInput.vue @@ -1,6 +1,6 @@ -
+

Link Privacy

diff --git a/client/components/open/forms/components/form-components/FormSecurityAccess.vue b/client/components/open/forms/components/form-components/FormSecurityAccess.vue index 2a5edea3..fd9ad195 100644 --- a/client/components/open/forms/components/form-components/FormSecurityAccess.vue +++ b/client/components/open/forms/components/form-components/FormSecurityAccess.vue @@ -72,7 +72,7 @@

Protect your form, and your sensitive files.

-
+
const workingFormStore = useWorkingFormStore() const { content: form } = storeToRefs(workingFormStore) +const config = useRuntimeConfig() -const captchaOptions = [ - { name: 'reCAPTCHA', value: 'recaptcha' }, - { name: 'hCaptcha', value: 'hcaptcha' }, -] +const hasCaptchaProviders = computed(() => { + return config.public.hCaptchaSiteKey || config.public.recaptchaSiteKey +}) + +const captchaOptions = computed(() => { + const options = [] + + if (config.public.recaptchaSiteKey) { + options.push({ name: 'reCAPTCHA', value: 'recaptcha' }) + } + + if (config.public.hCaptchaSiteKey) { + options.push({ name: 'hCaptcha', value: 'hcaptcha' }) + } + + return options +})