* oAuth for Stripe
* Stripe Payment Frontend - WIP
* Payment block backend validation and new package for stripe
* change stripe scopes
* update PaymentBlockConfigurationRule
* Set loader on provider modal
* stripe oauth
* PaymentFieldOptions as seprate component
* validate Stripe account
* Payment intent
* Stripe Payment as composable
* confirmCardPayment working
* Set payment errors on form.errors
* Validate card other fields
* Store payment id to database and on submission add link for view payment on stripe
* FormPaymentController no need auth middleware
* paymentinput error display on field
* Make payment block as input
change 'nf-payment' to 'payment'
* Refactor payment processing and error handling
* Multi lang & direction support on payment
* reset card on change direction or local
* use connected account for loadstripe
* validate OAuthProvider before delete it
* payment improvements
* display payment by stripe
* use stripe_currencies.json
* Form Payment testcase
* Enhance form auto-save behavior for payment forms
* Restrict payment block in self-hosted environments
* validate form before process payment
* Refactor Nuxt Configuration for Improved Development Server Settings
- Removed the existing Vite server configuration for hot module replacement (HMR) as it was no longer necessary.
- Introduced a new `devServer` configuration to specify the host and port for the development server, allowing for more flexible environment setup based on environment variables.
These changes aim to streamline the development process by enhancing server configuration and ensuring better adaptability to different environments.
* Enhance Payment Handling and User Experience in Forms
- Refactored `FormPaymentController` to improve handling of Stripe account retrieval, including better error messages for both editor preview and public forms.
- Updated `OAuthProviderController` to utilize caching for OAuth connection context, enhancing performance and user experience during account connections.
- Improved `PaymentInput.client.vue` to display a loading state and a preview message for users, guiding them to save the form for payment activation.
- Modified various components to standardize payment-related messages and improve localization support across multiple languages.
- Removed the deprecated `connections.vue` page to streamline the codebase.
These changes aim to enhance the overall user experience when handling payments and improve the maintainability of the payment-related components.
* Refactor Payment Handling and Enhance User Experience in Forms
- Updated `FormPaymentController` to utilize a new method for checking if the Stripe provider belongs to any workspace user, improving security and error logging.
- Modified `OAuthProviderController` to streamline the OAuth provider creation process by directly using the service object.
- Enhanced `Workspace` model with a new method to verify provider ownership, improving code clarity and maintainability.
- Improved `PaymentInput.client.vue` to handle loading states and error messages more effectively, enhancing user feedback during payment processing.
- Refactored `useFormInput.js` to include an `isAdminPreview` prop for better context handling in form components.
These changes aim to improve the overall user experience when handling payments and enhance the maintainability of the payment-related components.
* Enhance Payment Validation and User Experience in Forms
- Updated `UserFormRequest` to improve workspace handling during form submissions, allowing for better context in validation rules.
- Modified `PaymentBlockConfigurationRule` to include workspace validation, ensuring that payment providers are associated with the correct workspace, enhancing security and error logging.
- Improved `PaymentInput.client.vue` to dynamically determine the success state of payment processing, providing clearer user feedback.
- Updated various localization files to include a payment disclaimer, ensuring users are informed about credit card charges during payment processing.
These changes aim to enhance the overall user experience when handling payments and improve the maintainability of payment-related components.
* Enhance Payment Features and User Experience in Forms
- Added checks in `FormPaymentController` to disable payment features for self-hosted instances, improving clarity for users regarding feature availability.
- Updated `PaymentBlockConfigurationRule` to change the minimum amount validation from 0.5 to 1, ensuring stricter payment requirements.
- Enhanced `PaymentInput.client.vue` with dark mode support for various UI elements, improving accessibility and user experience in different themes.
- Modified `useFormInput.js` to include an `isDark` prop, allowing for better theme handling in form components.
- Updated error messages in `useStripeElements.js` to include periods for consistency and improved user feedback.
These changes aim to enhance the overall user experience when handling payments and improve the maintainability of payment-related components.
* Enhance Payment Input Component with Focus Handling and Theme Support
- Updated `PaymentInput.client.vue` to include focus and blur event handlers, improving user interaction by visually indicating when the card input is focused.
- Enhanced theme support by adding new properties in `form-themes.js` for `PaymentInput`, allowing for better styling and transitions based on focus state.
- Introduced a new `isCardFocused` reactive reference to manage the focus state of the card input, enhancing the overall user experience.
These changes aim to improve the usability and visual feedback of the payment input component, aligning with recent enhancements to user experience in payment forms.
* Refactor Payment Handling and Improve Code Consistency
- Updated various files to enhance code consistency by adding spaces in arrow function definitions, improving readability and adhering to coding standards.
- Modified `PaymentBlockConfigurationRule.php`, `FormPaymentController.php`, and `Workspace.php` to ensure uniformity in the use of arrow functions.
- Enhanced `PaymentInput.client.vue` and other components by improving the formatting of template elements for better visual structure.
- Updated `useStripeElements.js` to streamline state management and improve clarity in the handling of Stripe elements.
These changes aim to improve code maintainability and readability across the payment handling components, ensuring a more consistent coding style throughout the codebase.
* Enhance Form Model and Logging Configuration
- Added a new 'auto_save' boolean property to the Form model, allowing for automatic saving of form data.
- Updated the logging configuration to include a 'combined' channel that stacks multiple log channels, improving logging flexibility and error tracking.
- Modified the FormFactory to set a default value for 'auto_save' to false, ensuring consistent behavior across form instances.
- Improved error message structure in FormPaymentTest to provide clearer feedback when a payment block is missing.
These changes aim to enhance the functionality of forms and improve logging capabilities, contributing to better maintainability and user experience.
* Update api/config/logging.php
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
* Refactor Payment Error Handling and Localization Updates
- Updated `FormPaymentTest.php` to improve code consistency by adding spaces in arrow function definitions, enhancing readability.
- Modified `useStripeElements.js` to replace hardcoded error messages with localized strings, improving user experience and maintainability.
- Enhanced various localization files (e.g., `en.json`, `fr.json`, `de.json`, etc.) to include new error messages related to payment processing, ensuring users receive clear and consistent feedback across different languages.
These changes aim to enhance the clarity of error handling in payment processes and improve the overall user experience through better localization support.
* Enhance AddFormBlock and FieldOptions with Authentication Checks
- Added an icon to indicate authentication requirements for blocks in `AddFormBlock.vue`, improving user awareness of access restrictions.
- Implemented alert notifications using `useAlert()` for unauthorized block additions and input cloning, enhancing user feedback.
- Updated `FieldOptions.vue` to conditionally render payment field options, ensuring relevant options are displayed based on the field type.
- Modified `blocks_types.json` to include an `auth_required` property for specific block types, facilitating authentication checks.
These changes aim to improve user experience by providing clear indications of authentication requirements and enhancing form functionality.
* Enhance Authentication Checks in AddFormBlock Component
- Updated `AddFormBlock.vue` to conditionally render authentication-required icons based on user authentication status, improving user awareness of access restrictions.
- Implemented additional authentication checks in the `addBlock` and `handleInputClone` functions, utilizing `useAlert()` for notifying users when login is required to add blocks or clone inputs.
- Introduced a computed property to manage the authenticated state, streamlining the authentication logic within the component.
These changes aim to enhance user experience by providing clear indications of authentication requirements and improving the functionality of the form component.
* Enhance PaymentInput Component with Disabled State Support
- Updated `PaymentInput.client.vue` to include a `disabled` prop for the card holder name and email inputs, improving form accessibility and user experience by preventing interaction when necessary.
- Modified the card options to respect the `disabled` state, ensuring consistent behavior across the payment input fields.
These changes aim to enhance the usability of the payment input component by providing better control over user interactions.
* Add Payment Condition Logic and Update Filters
- Introduced a new payment condition in `FormLogicConditionChecker.php` to handle 'paid' and 'not_paid' states, enhancing form logic capabilities.
- Added corresponding payment comparators in `open_filters.json` for both API and client, ensuring consistent validation and expected types for payment conditions.
- Updated the JavaScript logic in `FormLogicConditionChecker.js` to include the new payment condition checks, improving the overall functionality of form conditions.
These changes aim to enhance the form logic related to payment states, providing better validation and user experience in payment-related forms.
* Refactor Authentication Checks in AddFormBlock and Working Form Store
- Removed redundant authentication checks from `AddFormBlock.vue` for adding blocks and cloning inputs, streamlining the logic.
- Centralized authentication validation in `working_form.js` to ensure consistent user feedback when authentication is required for specific block types.
- Enhanced user experience by utilizing `useAlert()` for notifying users about login requirements, improving clarity and interaction.
These changes aim to simplify the authentication logic and improve user notifications regarding access restrictions in form components.
* Refactor Feature Flags and Update Payment Input Logic
- Updated `FeatureFlagsController.php` to utilize the `Cache` facade directly, improving code clarity and consistency.
- Modified `PaymentInput.client.vue` to enhance the display logic for payment previews, ensuring a better user experience by conditionally showing messages based on the state of the Stripe account.
- Removed the `STRIPE_PUBLISHABLE_KEY` from `runtimeConfig.js` to streamline the configuration and replaced it with a computed property that retrieves the key from feature flags, improving maintainability.
- Adjusted the `.env.example` file to maintain consistency in environment variable definitions.
These changes aim to enhance the clarity of feature flag management and improve the user experience in payment interactions by refining the logic and configuration handling.
* Update Stripe Configuration in Services
- Modified the `services.php` configuration file to enhance the Stripe integration by providing default values for `client_secret` and `redirect` URI. This change ensures that the application can fallback to a predefined secret and a specific callback URL, improving the robustness of the payment service setup.
These changes aim to streamline the configuration process for Stripe, ensuring that necessary values are always available for the application to function correctly.
---------
Co-authored-by: Chirag Chhatrala <chirag.chhatrala@gmail.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
* Add Telegram Notification Integration
- Introduce Telegram Notification integration to the forms configuration.
- Add necessary properties including name, icon, section name, file name, actions file name, and pro status.
This update enhances the notification options available in the application, allowing users to integrate Telegram for notifications.
* Add Telegram integration support
- Updated .env.example to include Telegram bot configuration variables.
- Added the Telegram driver to OAuthProviderService for handling Telegram authentication.
- Created OAuthTelegramDriver class to manage Telegram OAuth interactions.
- Registered Telegram service in services.php with necessary credentials.
- Updated ProviderModal and TelegramIntegration components to support Telegram account connection and widget integration.
- Refactored integration forms to utilize FlatSelectInput for selecting Telegram accounts.
These changes enable users to connect their Telegram accounts for notifications, enhancing the integration capabilities of the application.
* Enhance Telegram integration and refactor settings components
- Added Telegram configuration to FeatureFlagsController for bot and redirect settings.
- Updated nuxt.config.ts to include settings components path for better organization.
- Refactored TelegramIntegration component to navigate to settings on connect.
- Renamed and updated ProviderModal and ProviderWidgetModal for consistency.
- Introduced TelegramWidget component for dynamic loading of the Telegram login widget.
- Refactored access tokens and connections pages to use updated component names.
These changes improve the Telegram integration and streamline the settings management interface.
* Refactor Telegram integration for widget-based authentication
- Updated .env.example to rename Telegram bot configuration variable from TELEGRAM_BOT_NAME to TELEGRAM_BOT_ID.
- Removed the Telegram provider from composer.json to streamline dependencies.
- Enhanced FeatureFlagsController to support new bot_id configuration.
- Implemented handleWidgetRedirect method in OAuthProviderController for handling widget authentication.
- Created WidgetOAuthDriver interface and refactored OAuthTelegramDriver to implement widget-based authentication methods.
- Updated services.php to reflect changes in Telegram configuration.
- Added widget callback route for handling authentication responses.
- Refactored TelegramWidget component to utilize the new widget authentication flow.
These changes improve the Telegram integration by enabling widget-based authentication, enhancing user experience and security.
* Enhance Telegram integration by adding provider support and refactoring data retrieval
- Introduced a new protected property `provider` in `AbstractIntegrationHandler` to store provider information.
- Updated the constructor to assign the provider from `formIntegration`.
- Refactored `getChatId` method in `TelegramIntegration` to utilize `provider_user_id` instead of the removed bot token.
- Adjusted the `shouldRun` method to include a check for `oauth_id` in `formIntegration`.
These changes improve the handling of provider data within the Telegram integration, enhancing its functionality and reliability.
* Enhance Telegram integration by adding MarkdownV2 escaping functionality
- Updated the message text formatting in the TelegramIntegration class to escape special characters for MarkdownV2.
- Introduced a new protected method `escapeMarkdownV2` to handle the escaping of special characters, improving message rendering in Telegram.
These changes enhance the Telegram integration by ensuring that messages are properly formatted for MarkdownV2, preventing potential rendering issues.
* fix pint
* Fix ESLint warning for unused variable in TelegramWidget component
* Remove unused variable declaration in TelegramWidget component to address ESLint warning. This change enhances code quality by adhering to linting rules and improving maintainability.
* Refactor Telegram integration components by removing unused code and improving maintainability
- Removed the 'refresh_token' field from the OAuthTelegramDriver as it is no longer needed.
- Eliminated unused variable declarations and interval logic in the TelegramIntegrationActions component to address ESLint warnings and enhance code quality.
These changes streamline the codebase and adhere to best practices for maintainability.
* Enhance Telegram integration by adding validation messages and improving message formatting
- Introduced custom validation messages for the `oauth_id` field in `FormIntegrationsRequest`, enhancing user feedback during integration setup.
- Refactored message construction in `TelegramIntegration` to utilize an array for building the message text, improving readability and maintainability.
- Updated the `handle` method to include error logging for missing `chat_id` and `bot token`, enhancing error handling and debugging capabilities.
These changes improve the user experience and reliability of the Telegram integration by providing clearer validation feedback and more robust error handling.
* Update environment variables documentation for clarity and consistency
- Reformatted the environment variables table for improved readability by aligning headers and descriptions.
- Added new environment variables for Telegram bot integration, including `TELEGRAM_BOT_ID` and `TELEGRAM_BOT_TOKEN`, to support enhanced notification features.
- Adjusted the warning message regarding Docker commands to improve clarity on environment variable reloading.
These changes enhance the documentation by ensuring that it is clear, consistent, and up-to-date with the latest configuration requirements.
---------
Co-authored-by: JhumanJ <julien@nahum.net>
- Implement extended token lifetime for "Remember Me" functionality
- Add token expiration details to authentication responses
- Update client-side token handling to support dynamic expiration
- Modify authentication middleware to handle token initialization more robustly
- Configure JWT configuration to support longer token lifetimes
Introduce a new environment variable and configuration option to allow users to hide official templates in the template gallery. This provides more flexibility for self-hosted instances of OpnForm.
- Update .dockerignore with comprehensive ignore patterns for API and client
- Modify docker-compose files to improve service configurations
- Enhance Nginx configuration for development and production environments
- Refactor Dockerfile.api with improved build process
- Add docker-setup.sh script for simplified Docker deployment
- Update update-credentials.vue page with improved UI
- Remove hCaptcha dependency from package-lock.json
- Update PHP configuration and entrypoint scripts
* 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>
- 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.
* 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>
* Custom SMTP Settings
* Fix lint
* Custom SMTP add in Pricing plan
* Allow reset email settings
* improve custom SMTP using seprate abstract class
* test case for custom SMTP
* fix test case
* UI improvement
* add CASHIER_KEY in phpunit for testcase
* Attempt to fix tests
* Run pint and attempt to fix cache tests
* Fix user management tests
* Fix code linters
* Merged main & fix linting
---------
Co-authored-by: Julien Nahum <julien@nahum.net>
* Re-organize a bit controllers
* Added the featureflagcontroller
* Implement feature flags in the front-end
* Clean env files
* Clean console.log messages
* Fix feature flag test