Commit Graph

895 Commits

Author SHA1 Message Date
Julien Nahum bf85d8fa76
Developer docker setup (#683)
* Add build context to compose

Signed-off-by: Daniel Ekman <knegge@gmail.com>

* Update Docker documentation with build instructions

Enhance Docker deployment documentation by:
- Adding detailed instructions for building Docker images
- Providing two methods for image building (Docker Compose and manual)
- Clarifying how to use local images with docker-compose.override.yml

* Add development Docker configuration

Introduce development-specific Docker configuration:
- Create docker-compose.dev.yml for local development setup
- Add nginx.dev.conf with development CORS settings
- Update Dockerfile.api to support environment-specific dependency installation
- Configure development services with appropriate volumes and environment variables

* Improve Docker and Development Documentation

- Remove platform-specific ARM64 constraints in docker-compose.dev.yml
- Enhance Nginx configuration with improved proxy and HMR settings
- Update documentation for development setup and Docker deployment
- Add new Docker development documentation page
- Refactor getting started guide with clearer development instructions

* Enhance Docker configuration and CI/CD pipeline

- Update Docker Compose files with improved service configurations
- Add database healthcheck in docker-compose.yml
- Refactor GitHub Actions workflow for Docker image publishing
- Optimize Dockerfile.api with multi-stage build and environment-specific configurations
- Update Nginx configuration for development and production environments

* Add GitHub Actions permissions for Docker image publishing

Configure GitHub Actions workflow with explicit read and write permissions for content and packages to improve security and clarity of Docker image deployment process

---------

Signed-off-by: Daniel Ekman <knegge@gmail.com>
Co-authored-by: Daniel Ekman <knegge@gmail.com>
2025-01-28 17:52:48 +01:00
Daniel Ekman ae74f33a27
Add build context to compose (#680)
* Add build context to compose

Signed-off-by: Daniel Ekman <knegge@gmail.com>

* Update Docker documentation with build instructions

Enhance Docker deployment documentation by:
- Adding detailed instructions for building Docker images
- Providing two methods for image building (Docker Compose and manual)
- Clarifying how to use local images with docker-compose.override.yml

---------

Signed-off-by: Daniel Ekman <knegge@gmail.com>
Co-authored-by: Julien Nahum <julien@nahum.net>
2025-01-28 12:56:01 +01:00
Julien Nahum 735f398605 Fix forms 2025-01-28 09:23:11 +01:00
Julien Nahum c49af07aa1 Merge branch 'main' of https://github.com/JhumanJ/OpnForm 2025-01-27 18:24:33 +01:00
Julien Nahum 4a2adcf8f7 Add client linting to GitHub Actions workflow
Enhance CI/CD pipeline by introducing a new job to run ESLint on the client application. This ensures code quality and consistency for the frontend codebase.
2025-01-27 18:24:27 +01:00
Chirag Chhatrala 4fae4e6328
Enhance email settings functionality by adding sender address support (#668)
Co-authored-by: Julien Nahum <julien@nahum.net>
2025-01-27 16:07:01 +01:00
Julien Nahum a91c194161 Update Billing Tab Condition in Settings Page
Change the condition for displaying the Billing tab from checking user subscription status to verifying the presence of a customer ID
2025-01-27 11:37:36 +01:00
Julien Nahum b5f5f40753 Add reCAPTCHA environment variables to documentation
- Updated environment variables table to include reCAPTCHA site and secret keys
- Added front-end and back-end reCAPTCHA configuration variables
- Maintained consistent documentation style with existing entries
2025-01-25 18:12:20 +01:00
Chirag Chhatrala 55bbb476a9
Fix EmailIntegrationActions for display emails (#667)
Co-authored-by: Julien Nahum <julien@nahum.net>
2025-01-16 10:23:59 +01:00
Julien Nahum a67dff14a4 Fixed linting 2025-01-16 10:09:54 +01:00
Julien Nahum 9bf83d5f89 Enhance Tax Export Command Date Handling
- Improved date validation logic in the GenerateTaxExport command.
- Added default start date as the first day of the previous month if not specified, with user confirmation.
- Set default end date to the end of the month based on the start date if not provided.
- Refactored date formatting for better readability and consistency in log messages.
- Enhanced the clarity of the progress bar query options by formatting the expand array.

These changes improve user experience by providing sensible defaults for date inputs and ensuring clear communication of the command's actions.
2025-01-14 14:40:26 +01:00
Julien Nahum 747b41d0a6 Add error logging for integration failures in AbstractIntegrationHandler
- Introduced logging of integration failures to capture detailed error information.
- Enhanced error handling by logging the form ID and integration ID along with the exception data.

These changes improve the observability of integration processes, aiding in debugging and monitoring.
2025-01-14 14:34:03 +01:00
Julien Nahum e3fd709326 Refactor Email Integration Handling
- Removed the AbstractEmailIntegrationHandler class to streamline email integration logic.
- Updated EmailIntegration class to extend AbstractIntegrationHandler instead of the removed class.
- Modified FormEmailNotification to handle mailer configuration internally, eliminating the need to pass the mailer as a parameter.

These changes enhance the clarity and maintainability of the email integration process by consolidating configuration logic and reducing class dependencies.
2025-01-14 13:29:09 +01:00
Chirag Chhatrala 06c35121a0
Set char limit on rich text (#662)
* Set char limit on rich text

* richtext placeholder
2025-01-14 11:27:37 +01:00
Chirag Chhatrala 72d139e2af
Fix Submissions Export (#663) 2025-01-09 10:11:55 +01:00
Chirag Chhatrala cc62f614e4
Enhance Form Submission Export Functionality (#657)
* Enhance Form Submission Export Functionality

* Validate new param 'columns'

* Form submission export request as seprate class with validation

* Test case for export

---------

Co-authored-by: Julien Nahum <julien@nahum.net>
2025-01-07 15:04:02 +01:00
Chirag Chhatrala b0311257ac
improve s3key exception (#661) 2025-01-06 12:52:20 +01:00
Chirag Chhatrala 5bc0d3ccc8
fix mobile editor email (#660) 2025-01-06 12:52:03 +01:00
Chirag Chhatrala 75f82b3bc7
Refactor form components (#659)
* Add Barcode Input Component and Integrate Quagga for Scanning

- Introduced a new BarcodeInput component for scanning barcodes using the Quagga library.
- Updated package.json and package-lock.json to include Quagga as a dependency.
- Enhanced form themes to accommodate the new BarcodeInput component.
- Added localization support for barcode scanning actions in English.
- Updated blocks_types.json to register the new barcode input type.

These changes improve the application's functionality by allowing users to scan barcodes directly within forms, enhancing user experience and data input efficiency.

* Update Barcode scanner UI

* Barcode decoder as user selection

* improve barcode

* Refactor form components and update Tailwind configuration

- Removed unused box shadow styles from tailwind.config.js.
- Enhanced DateInput, FileInput, MatrixInput, RichTextAreaInput, and VSelect components with improved styling and error handling.
- Updated theme settings in form-themes.js to include new styles for MatrixInput and other form elements.
- Adjusted labels in FieldOptions.vue for clarity.
- Improved overall UI consistency and responsiveness across form components.

---------

Co-authored-by: Julien Nahum <julien@nahum.net>
2025-01-03 16:15:47 +01:00
Chirag Chhatrala 80b7c1e773
Form editor logic copy to x (#656)
* Form editor logic copy to x

* Refactor form components to use UButton and UButtonGroup for improved consistency and styling
2025-01-03 16:09:53 +01:00
Chirag Chhatrala 1285dc18d3
Support for Barcode reader (#650)
* Add Barcode Input Component and Integrate Quagga for Scanning

- Introduced a new BarcodeInput component for scanning barcodes using the Quagga library.
- Updated package.json and package-lock.json to include Quagga as a dependency.
- Enhanced form themes to accommodate the new BarcodeInput component.
- Added localization support for barcode scanning actions in English.
- Updated blocks_types.json to register the new barcode input type.

These changes improve the application's functionality by allowing users to scan barcodes directly within forms, enhancing user experience and data input efficiency.

* Update Barcode scanner UI

* Barcode decoder as user selection

* improve barcode
2025-01-03 16:07:58 +01:00
Chirag Chhatrala 09c4417731
Embed form flickering bug (#658)
* Embed form flickering bug

* fix issue when remove hidden class
2025-01-03 16:03:02 +01:00
Chirag Chhatrala 2366f9515d
Readonly User (#637)
* Readonly User

* Refactor FormPolicy and TemplatePolicy to centralize write operation logic

- Introduced a private method `canPerformWriteOperation` in both FormPolicy and TemplatePolicy to encapsulate the logic for determining if a user can perform write operations on the respective models.
- Updated the `update`, `delete`, `restore`, and `forceDelete` methods in FormPolicy to use the new method for improved readability and maintainability.
- Simplified the `update` and `delete` methods in TemplatePolicy to leverage the centralized write operation logic.

This refactoring enhances code clarity and reduces duplication across policy classes.

* Refactor user and workspace permissions handling

- Updated FormController to authorize form creation based on workspace context.
- Removed the `is_readonly` attribute from UserResource and integrated it into WorkspaceResource for better encapsulation.
- Refactored User model to eliminate the `getIsReadonlyAttribute` method, shifting readonly logic to the Workspace model.
- Adjusted FormPolicy and TemplatePolicy to utilize workspace readonly checks for user permissions.
- Updated various frontend components to reference workspace readonly status instead of user readonly status, enhancing clarity and consistency in permission handling.

These changes improve the management of user permissions in relation to workspaces, ensuring a more robust and maintainable authorization system.

* Fix isReadonlyUser

* fix pint

---------

Co-authored-by: Julien Nahum <julien@nahum.net>
2024-12-30 14:35:23 +01:00
Chirag Chhatrala 9a2d7b9d8d
On slack,discord add support for Include hidden fields (#654) 2024-12-30 11:11:17 +01:00
Chirag Chhatrala 3d9bc60ca1
Evaluate custom validation rules first (#655) 2024-12-30 11:00:10 +01:00
Julien Nahum 1bddafbb3e Update local deployment instructions to use HTTPS for repository cloning 2024-12-26 17:41:23 +01:00
Chirag Chhatrala d18c4cc9bf
ESC-417-date-input-is-not-showing-in-google-sheet (#653) 2024-12-19 13:34:41 +01:00
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
Chirag Chhatrala 7365479c83
Email spam security (#641)
* Add hCaptcha on register page

* register page captcha test cases

* Refactor integration validation rules to include form context

- Updated the `getValidationRules` method in various integration handlers (Discord, Email, Google Sheets, Slack, Webhook, Zapier) to accept an optional `Form` parameter, allowing for context-aware validation.
- Enhanced the `EmailIntegration` handler to enforce restrictions based on user plans, ensuring free users can only create one email integration per form and can only send to a single email address.
- Added a new test suite for `EmailIntegration` to validate the new restrictions and ensure proper functionality for both free and pro users.
- Introduced loading state management in the `IntegrationModal` component to improve user experience during save operations.

These changes improve the flexibility and user experience of form integrations, particularly for email handling.

* for self-hosted ignore emil validation for spam

* fix pint

* ignore register throttle for testing env

* support new migration for mysql also

* Register page captcha enable if captcha key set

* fix test case

* fix test case

* fix test case

* fix pint

* Refactor RegisterController middleware and update TestCase setup

- Removed environment check for throttling middleware in RegisterController, ensuring consistent rate limiting for the registration endpoint.
- Updated TestCase to disable throttle middleware during tests, allowing for more flexible testing scenarios without rate limiting interference.

* Enhance hCaptcha integration in tests and configuration

- Added hCaptcha site and secret keys to phpunit.xml for testing purposes.
- Updated RegisterTest to configure hCaptcha secret key dynamically, ensuring proper token validation in production environment.

These changes improve the testing setup for hCaptcha, facilitating more accurate simulation of production conditions.

---------

Co-authored-by: Julien Nahum <julien@nahum.net>
2024-12-18 13:16:27 +01:00
Chirag Chhatrala c1ee072b71
Improve Integration Cards (#643)
* Add integration action components and update integration JSON files

- Introduced new action components for Email, Slack, Discord, Webhook, and Google Sheets integrations, enhancing the user interface for managing these integrations.
- Updated the `integrations.json` files to include `actions_file_name` for each integration, linking them to their respective action components.
- Improved the `GoogleSheetsIntegrationActions.vue` component by replacing direct provider information display with a badge for better UI consistency.

These changes aim to streamline integration management and improve the overall user experience.

* Minor UI fixes

---------

Co-authored-by: Julien Nahum <julien@nahum.net>
2024-12-18 13:07:19 +01:00
Chirag Chhatrala 49c2d6bf04
ESC-409 image-block-does-not-align (#651) 2024-12-17 17:10:31 +01:00
Chirag Chhatrala 28019fc7a0
Implement regex validation conditions in form logic (#645)
* Implement regex validation conditions in form logic

- Added support for 'matches_regex' and 'does_not_match_regex' conditions in FormPropertyLogicRule and FormLogicConditionChecker.
- Updated validation logic to handle regex patterns, including error handling for invalid patterns.
- Enhanced tests to cover scenarios for successful and failed regex validation, ensuring proper feedback for form submissions.
- Updated JSON schema to include new regex condition types.

These changes improve the flexibility of form validation by allowing regex-based conditions, enhancing user experience through more robust validation mechanisms.

* update resource filters

* Remove ray

---------

Co-authored-by: Julien Nahum <julien@nahum.net>
2024-12-16 17:17:29 +01:00
Chirag Chhatrala 25a1d032a1
ESC-406 Fix Mention Extendtion for Quill (#648) 2024-12-16 10:08:13 +01:00
rl1987 b782631709
Update Docker Compose commands in page documenting Docker Compose deployment (#644) 2024-12-12 14:21:16 +01:00
Chirag Chhatrala 20405ee606
Send mobile editor email (#634)
Co-authored-by: Julien Nahum <julien@nahum.net>
2024-12-12 11:19:09 +01:00
Chirag Chhatrala ea4cd85eae
Enhance redirect URL handling and MentionParser functionality (#639)
- Updated the `redirect_url` validation in `UserFormRequest` to accept strings instead of just max length.
- Modified `MentionParser` to include a `urlFriendlyOutput` method, allowing for URL encoding of special characters in parsed values.
- Adjusted the `PublicFormController` to utilize the new `urlFriendlyOutput` method for redirect URLs.
- Created a migration to change the `redirect_url` field type in the database from string to text, accommodating longer URLs.
- Added tests to ensure proper handling of long redirect URLs and the functionality of the new URL-friendly output feature in `MentionParser`.

This update improves the flexibility and robustness of form handling and URL processing.
2024-12-10 12:26:01 +01:00
Julien Nahum d09b5c45a5 Update validation messages for clarity in English and Spanish
- Revised the 'invalid_json' validation message in both English and Spanish to enhance clarity and user understanding. The new messages are more concise and direct, improving the overall user experience when inputting data.
2024-12-09 20:28:34 +01:00
Julien Nahum 705c84dae4 Enhance language support and fix validation messages
- Added support for additional languages (Bengali, Portuguese, Russian, Urdu, Punjabi, German, Javanese, Korean, Vietnamese, Telugu, Marathi, Tamil, Turkish) in the application.
- Updated validation messages across multiple languages to correct formatting issues and improve clarity, including Arabic, English, Spanish, French, Hindi, Japanese, Norwegian, and Chinese.
- Removed obsolete Norwegian language files to streamline localization efforts.
- Improved the language selection interface in the form customization component.

These changes aim to enhance user experience by providing better language support and clearer validation feedback.
2024-12-09 12:47:01 +01:00
Julien Nahum 39b95f1683 Merge branch 'main' of https://github.com/JhumanJ/OpnForm 2024-12-06 14:49:15 +01:00
Julien Nahum 18bb005f7a Enhance Mention Extension for Quill Editor
- Introduced a custom Clipboard module to sanitize pasted content by removing invalid mention formatting.
- Updated MentionBlot creation logic to ensure mentions are only created with valid data, specifically checking for 'nf_id'.
- Improved attribute setting for mentions to prevent issues with invalid or missing data.

These changes aim to improve the reliability and integrity of mentions within the Quill editor.
2024-12-06 14:49:06 +01:00
Chirag Chhatrala daca69267b
Form Translation (#616)
* Form Translation

* Support for other languages

* Support locale for datepicker

* Apply translation on select input

* Apply translation on select input

* Improve translation

---------

Co-authored-by: Julien Nahum <julien@nahum.net>
2024-12-04 18:32:14 +01:00
Chirag Chhatrala c927a235f8
fix subscription success page (#636)
* fix subscription success page

* Fix typo
2024-12-02 10:55:09 +01:00
Julien Nahum 6cf1cd663a Refactor AnswerFormRequest to enhance option matching logic
- Improved the option matching logic in AnswerFormRequest by ensuring both 'id' and 'name' are checked for validity before comparison.
- Simplified the handling of selection fields and single select values to return the original value if no match is found.

This change aims to increase the robustness of data handling in form requests.
2024-11-29 15:17:49 +01:00
Chirag Chhatrala 13c40f6e54
Support for Rich Text Input (#630)
* Support for Rich Text Input

* rich text support for prefilled

* apply Purify for rich_text

---------

Co-authored-by: Julien Nahum <julien@nahum.net>
2024-11-28 16:12:24 +01:00
Julien Nahum e2c6af69e6 [ESC-389]form-requires-to-answer 2024-11-28 10:22:33 +01:00
Julien Nahum a41563a183 Fix pricing custom plan 2024-11-28 09:17:45 +01:00
Chirag Chhatrala 3d09f32078
fix error display modal (#632) 2024-11-26 12:13:39 +01:00
Chirag Chhatrala 1224b890db
Fix phoneinput inputval watcher (#631) 2024-11-25 17:26:43 +01:00
Julien Nahum 1a917cf7ce Added enterprise plan 2024-11-23 17:38:20 +01:00
Chirag Chhatrala 5cd9885185
improve RTL mode (#625)
Co-authored-by: Julien Nahum <julien@nahum.net>
2024-11-21 16:14:27 +01:00