opnform-host-nginx/client/components/forms
Chirag Chhatrala d7ce8536c8
Add reCAPTCHA support and update captcha provider handling (#647)
* Add reCAPTCHA support and update captcha provider handling

- Introduced reCAPTCHA as an additional captcha provider alongside hCaptcha.
- Updated form request validation to handle different captcha providers based on user selection.
- Added a new validation rule for reCAPTCHA.
- Modified the forms model to include a 'captcha_provider' field.
- Created a migration to add the 'captcha_provider' column to the forms table.
- Updated frontend components to support dynamic rendering of captcha based on the selected provider.
- Enhanced tests to cover scenarios for both hCaptcha and reCAPTCHA.

These changes improve the flexibility of captcha options available to users, enhancing form security and user experience.

* fix pint

* change comment text

* Refactor captcha implementation and integrate new captcha components

- Removed the old RecaptchaV2 component and replaced it with a new implementation that supports both reCAPTCHA and hCaptcha through a unified CaptchaInput component.
- Updated the OpenForm component to utilize the new CaptchaInput for dynamic captcha rendering based on user-selected provider.
- Cleaned up the package.json by removing the deprecated @hcaptcha/vue3-hcaptcha dependency.
- Enhanced form initialization to set a default captcha provider.
- Improved error handling and cleanup for both reCAPTCHA and hCaptcha scripts.

These changes streamline captcha integration, improve maintainability, and enhance user experience by providing a more flexible captcha solution.

* Refactor captcha error messages and localization support

* Refactor registration process to integrate reCAPTCHA

- Replaced hCaptcha implementation with reCAPTCHA in RegisterController and related test cases.
- Updated validation rules to utilize g-recaptcha-response instead of h-captcha-response.
- Modified RegisterForm component to support reCAPTCHA, including changes to the form data structure and component references.
- Enhanced test cases to reflect the new reCAPTCHA integration, ensuring proper validation and response handling.

These changes improve security and user experience during the registration process by adopting a more widely used captcha solution.

* Fix reCAPTCHA configuration and update RegisterForm styling

- Corrected the configuration key for reCAPTCHA in RegisterController from 'services.recaptcha.secret_key' to 'services.re_captcha.secret_key'.
- Updated the styling of the Captcha input section in RegisterForm.vue to improve layout consistency.

These changes ensure proper reCAPTCHA functionality and enhance the user interface during the registration process.

* Fix reCAPTCHA configuration in RegisterTest to use the correct key format

- Updated the configuration key for reCAPTCHA in RegisterTest from 'services.recaptcha.secret_key' to 'services.re_captcha.secret_key' to ensure proper functionality during tests.

This change aligns the test setup with the recent updates in the reCAPTCHA integration, improving the accuracy of the registration process tests.

---------

Co-authored-by: Julien Nahum <julien@nahum.net>
2024-12-18 16:35:09 +01:00
..
components Add reCAPTCHA support and update captcha provider handling (#647) 2024-12-18 16:35:09 +01:00
validation Form Editor v2.5 (#599) 2024-10-23 10:34:51 +02:00
CheckboxInput.vue Matrix Improvements (#606) 2024-11-20 17:06:11 +01:00
CodeInput.client.vue fix disabled input dark mode (#622) 2024-11-21 15:59:04 +01:00
ColorInput.vue Form editor v2 (#579) 2024-09-23 20:02:38 +02:00
DateInput.vue Form Translation (#616) 2024-12-04 18:32:14 +01:00
FileInput.vue Form Translation (#616) 2024-12-04 18:32:14 +01:00
FlatSelectInput.vue Form Translation (#616) 2024-12-04 18:32:14 +01:00
ImageInput.vue fix image input clear (#485) 2024-07-15 10:07:00 +02:00
MatrixInput.vue improve RTL mode (#625) 2024-11-21 16:14:27 +01:00
MentionInput.vue fix disabled input dark mode (#622) 2024-11-21 15:59:04 +01:00
PhoneInput.vue Fix phoneinput inputval watcher (#631) 2024-11-25 17:26:43 +01:00
RatingInput.vue Better form themes (#465) 2024-06-27 17:52:49 +02:00
RichTextAreaInput.client.vue fix disabled input dark mode (#622) 2024-11-21 15:59:04 +01:00
ScaleInput.vue Better form themes (#465) 2024-06-27 17:52:49 +02:00
SelectInput.vue ESC-240: Fix null pointer exception in SelectInput getOptionName method 2024-08-07 17:30:48 +02:00
SignatureInput.vue Form Translation (#616) 2024-12-04 18:32:14 +01:00
SliderInput.vue slider input color (#391) 2024-05-07 13:29:19 +02:00
TextAreaInput.vue fix disabled input dark mode (#622) 2024-11-21 15:59:04 +01:00
TextBlock.vue Apply Mentions everywhere (#595) 2024-10-22 10:34:29 +02:00
TextInput.vue fix disabled input dark mode (#622) 2024-11-21 15:59:04 +01:00
ToggleSwitchInput.vue Matrix Improvements (#606) 2024-11-20 17:06:11 +01:00
VForm.vue Better form themes (#465) 2024-06-27 17:52:49 +02:00
useFormInput.js Form Translation (#616) 2024-12-04 18:32:14 +01:00