From 8b7cafd228e5a3f5edbadf1e6acf350427a40e7c Mon Sep 17 00:00:00 2001
From: Deependra Chaudhary
Date: Mon, 27 May 2024 13:35:17 +0545
Subject: [PATCH 01/32] Version bump 3.0.0.1 for release
---
assets/js/admin/deactivation-feedback.min.js | 2 +-
changelog.txt | 5 +++++
everest-forms.php | 2 +-
includes/class-everest-forms.php | 2 +-
languages/everest-forms.pot | 6 +++---
readme.txt | 6 +++++-
6 files changed, 16 insertions(+), 7 deletions(-)
diff --git a/assets/js/admin/deactivation-feedback.min.js b/assets/js/admin/deactivation-feedback.min.js
index c57d728b9..5c0aaeca5 100644
--- a/assets/js/admin/deactivation-feedback.min.js
+++ b/assets/js/admin/deactivation-feedback.min.js
@@ -1 +1 @@
-jQuery(function(a){({init:function(){this.event_init()},event_init:function(){var t=this;a(document.body).on("click",'tr[data-plugin="everest-forms/everest-forms.php"] span.deactivate a',function(e){e.preventDefault(),a("#evf-deactivate-feedback-popup-wrapper").addClass("active")}),a("#evf-deactivate-feedback-popup-wrapper").click(function(e){a(e.target).closest(".evf-deactivate-feedback-popup-inner").length||a("#evf-deactivate-feedback-popup-wrapper").removeClass("active")}),a("form.evf-deactivate-feedback-form").on("submit",function(e){e.preventDefault(),t.send_data(a(this))}),a("#evf-deactivate-feedback-popup-wrapper").on("click",".close-deactivate-feedback-popup",function(){a("#evf-deactivate-feedback-popup-wrapper").removeClass("active")}),a("input.evf-deactivate-feedback-input").on("click",function(){var e=a(this),t=a('input[name="reason_other"]');"other"===e.val()?t.attr("required","required"):t.removeAttr("required")})},send_data:function(e){var t=e.find('input[name="reason_slug"]:checked').val();t===undefined?alert("Please select at least one option from the list"):e.find("button.submit").hasClass("button-disabled")||(0<(t=e.find('input[name="reason_'+t+'"]')).length&&t.val(),a.ajax({url:evf_plugins_params.ajax_url,data:e.serializeArray(),type:"post",beforeSend:function(){e.find("button.submit").addClass("button-disabled button updating-message")}}).done(function(){window.location=e.find("a.skip").attr("href")}))}}).init()});
\ No newline at end of file
+jQuery(function(a){({init:function(){this.event_init()},event_init:function(){var t=this;a(document.body).on("click",'tr[data-plugin="everest-forms/everest-forms.php"] span.deactivate a',function(e){e.preventDefault(),a("#evf-deactivate-feedback-popup-wrapper").addClass("active")}),a("#evf-deactivate-feedback-popup-wrapper").click(function(e){a(e.target).closest(".evf-deactivate-feedback-popup-inner").length||a("#evf-deactivate-feedback-popup-wrapper").removeClass("active")}),a("form.evf-deactivate-feedback-form").on("submit",function(e){e.preventDefault(),t.send_data(a(this))}),a("#evf-deactivate-feedback-popup-wrapper").on("click",".close-deactivate-feedback-popup",function(){a("#evf-deactivate-feedback-popup-wrapper").removeClass("active")}),a("input.evf-deactivate-feedback-input").on("click",function(){var e=a(this),t=a('input[name="reason_'+e.val()+'"]');"other"===e.val()||"feature_unavailable"===e.val()||"complex_to_use"===e.val()?t.attr("required","required"):t.removeAttr("required")})},send_data:function(e){var t=e.find('input[name="reason_slug"]:checked').val();t===undefined?alert("Please select at least one option from the list"):e.find("button.submit").hasClass("button-disabled")||(0<(t=e.find('input[name="reason_'+t+'"]')).length&&t.val(),a.ajax({url:evf_plugins_params.ajax_url,data:e.serializeArray(),type:"post",beforeSend:function(){e.find("button.submit").addClass("button-disabled button updating-message")}}).done(function(){window.location=e.find("a.skip").attr("href")}))}}).init()});
\ No newline at end of file
diff --git a/changelog.txt b/changelog.txt
index a9fd38c1c..342a4f5de 100644
--- a/changelog.txt
+++ b/changelog.txt
@@ -1,5 +1,10 @@
== Changelog ==
+= 3.0.0.1 - 27-05-2024
+* Fix - Form builder loading when recaptcha is enabled.
+* Tweak - Captcha name change to math captcha.
+
+
= 3.0.0 - 23-05-2024
* Feature - Dashboard page.
* Feature - Email scheduling in daily, weekly or monthly for the progress data of form.
diff --git a/everest-forms.php b/everest-forms.php
index 85908f2db..937bad819 100644
--- a/everest-forms.php
+++ b/everest-forms.php
@@ -3,7 +3,7 @@
* Plugin Name: Everest Forms
* Plugin URI: https://everestforms.net/
* Description: Drag and Drop contact form builder to easily create simple to complex forms for any purpose. Lightweight, Beautiful design, responsive and more.
- * Version: 3.0.0
+ * Version: 3.0.0.1
* Author: WPEverest
* Author URI: https://wpeverest.com
* Text Domain: everest-forms
diff --git a/includes/class-everest-forms.php b/includes/class-everest-forms.php
index 6efae78c5..a98af5fab 100644
--- a/includes/class-everest-forms.php
+++ b/includes/class-everest-forms.php
@@ -21,7 +21,7 @@ final class EverestForms {
*
* @var string
*/
- public $version = '3.0.0';
+ public $version = '3.0.0.1';
/**
* The single instance of the class.
diff --git a/languages/everest-forms.pot b/languages/everest-forms.pot
index ecb41761e..197a9af5e 100644
--- a/languages/everest-forms.pot
+++ b/languages/everest-forms.pot
@@ -2,14 +2,14 @@
# This file is distributed under the same license as the Everest Forms plugin.
msgid ""
msgstr ""
-"Project-Id-Version: Everest Forms 3.0.0\n"
+"Project-Id-Version: Everest Forms 3.0.0.1\n"
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/everest-forms\n"
"Last-Translator: FULL NAME \n"
"Language-Team: LANGUAGE \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"POT-Creation-Date: 2024-05-23T08:33:26+00:00\n"
+"POT-Creation-Date: 2024-05-27T07:48:27+00:00\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"X-Generator: WP-CLI 2.8.1\n"
"X-Domain: everest-forms\n"
@@ -13335,7 +13335,7 @@ msgid "HTML"
msgstr ""
#: includes/fields/class-evf-field-captcha.php:20
-msgid "Captcha"
+msgid "Math Captcha"
msgstr ""
#: includes/fields/class-evf-field-checkbox.php:20
diff --git a/readme.txt b/readme.txt
index 982c6c64c..fa1825240 100644
--- a/readme.txt
+++ b/readme.txt
@@ -4,7 +4,7 @@ Tags: contact form, custom form, form builder, forms, survey
Requires at least: 5.2
Tested up to: 6.5.3
Requires PHP: 7.2
-Stable tag: 3.0.0
+Stable tag: 3.0.0.1
License: GPLv3
License URI: http://www.gnu.org/licenses/gpl-3.0.html
@@ -292,6 +292,10 @@ Yes you can! Join in on our [GitHub repository](https://github.com/wpeverest/eve
== Changelog ==
+= 3.0.0.1 - 27-05-2024
+* Fix - Form builder loading when recaptcha is enabled.
+* Tweak - Captcha name change to math captcha.
+
= 3.0.0 - 23-05-2024
* Feature - Dashboard page.
* Feature - Email scheduling in daily, weekly or monthly for the progress data of form.
From 8e4f3377451f32bb7c8995a50b3847c6d20f1ebd Mon Sep 17 00:00:00 2001
From: Deependra Chaudhary
Date: Mon, 27 May 2024 13:53:19 +0545
Subject: [PATCH 02/32] Version bump 3.0.0.1 for release
---
includes/fields/class-evf-field-recaptcha.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/includes/fields/class-evf-field-recaptcha.php b/includes/fields/class-evf-field-recaptcha.php
index f1021100b..bbd72cda6 100644
--- a/includes/fields/class-evf-field-recaptcha.php
+++ b/includes/fields/class-evf-field-recaptcha.php
@@ -81,7 +81,7 @@ public function field_preview( $field ) {
$image_url = plugins_url( 'assets/images/captcha/google-v3-reCAPTCHA.png', EVF_PLUGIN_FILE );
}
// Primary input.
- echo '';
+ echo '';
}
From c643950be138a935e5afef53367b8148538ff638 Mon Sep 17 00:00:00 2001
From: MILAN88888
Date: Tue, 28 May 2024 12:56:29 +0545
Subject: [PATCH 03/32] Fix - Unwanted file
---
assets/css/class-evf-frontend-scripts.php | 377 ----------------------
1 file changed, 377 deletions(-)
delete mode 100644 assets/css/class-evf-frontend-scripts.php
diff --git a/assets/css/class-evf-frontend-scripts.php b/assets/css/class-evf-frontend-scripts.php
deleted file mode 100644
index 1899f67bc..000000000
--- a/assets/css/class-evf-frontend-scripts.php
+++ /dev/null
@@ -1,377 +0,0 @@
- array(
- 'src' => self::get_asset_url( 'assets/css/everest-forms.css' ),
- 'deps' => '',
- 'version' => EVF_VERSION,
- 'media' => 'all',
- 'has_rtl' => true,
- ),
- 'jquery-intl-tel-input' => array(
- 'src' => self::get_asset_url( 'assets/css/intlTelInput/intlTelInput.css' ),
- 'deps' => array(),
- 'version' => EVF_VERSION,
- 'has_rtl' => false,
- ),
- 'everest-forms-survey-polls-quiz-style' => array(
- 'src' => self::get_asset_url( 'assets/css/evf-survey-polls-quiz.css' ),
- 'deps' => array(),
- 'version' => EVF_VERSION,
- 'has_rtl' => false,
- ),
- )
- );
- }
-
- /**
- * Return asset URL.
- *
- * @param string $path Assets path.
- *
- * @return string
- */
- private static function get_asset_url( $path ) {
- return apply_filters( 'everest_forms_get_asset_url', plugins_url( $path, EVF_PLUGIN_FILE ), $path );
- }
-
- /**
- * Register a script for use.
- *
- * @uses wp_register_script()
- * @param string $handle Name of the script. Should be unique.
- * @param string $path Full URL of the script, or path of the script relative to the WordPress root directory.
- * @param string[] $deps An array of registered script handles this script depends on.
- * @param string $version String specifying script version number, if it has one, which is added to the URL as a query string for cache busting purposes. If version is set to false, a version number is automatically added equal to current installed WordPress version. If set to null, no version is added.
- * @param boolean $in_footer Whether to enqueue the script before
instead of in the
. Default 'false'.
- */
- private static function register_script( $handle, $path, $deps = array( 'jquery' ), $version = EVF_VERSION, $in_footer = true ) {
- self::$scripts[] = $handle;
- wp_register_script( $handle, $path, $deps, $version, $in_footer );
- }
-
- /**
- * Register and enqueue a script for use.
- *
- * @uses wp_enqueue_script()
- * @param string $handle Name of the script. Should be unique.
- * @param string $path Full URL of the script, or path of the script relative to the WordPress root directory.
- * @param string[] $deps An array of registered script handles this script depends on.
- * @param string $version String specifying script version number, if it has one, which is added to the URL as a query string for cache busting purposes. If version is set to false, a version number is automatically added equal to current installed WordPress version. If set to null, no version is added.
- * @param boolean $in_footer Whether to enqueue the script before instead of in the
. Default 'false'.
- */
- private static function enqueue_script( $handle, $path = '', $deps = array( 'jquery' ), $version = EVF_VERSION, $in_footer = true ) {
- if ( ! in_array( $handle, self::$scripts, true ) && $path ) {
- self::register_script( $handle, $path, $deps, $version, $in_footer );
- }
- wp_enqueue_script( $handle );
- }
-
- /**
- * Register a style for use.
- *
- * @uses wp_register_style()
- * @param string $handle Name of the stylesheet. Should be unique.
- * @param string $path Full URL of the stylesheet, or path of the stylesheet relative to the WordPress root directory.
- * @param string[] $deps An array of registered stylesheet handles this stylesheet depends on.
- * @param string $version String specifying stylesheet version number, if it has one, which is added to the URL as a query string for cache busting purposes. If version is set to false, a version number is automatically added equal to current installed WordPress version. If set to null, no version is added.
- * @param string $media The media for which this stylesheet has been defined. Accepts media types like 'all', 'print' and 'screen', or media queries like '(orientation: portrait)' and '(max-width: 640px)'.
- * @param boolean $has_rtl If has RTL version to load too.
- */
- private static function register_style( $handle, $path, $deps = array(), $version = EVF_VERSION, $media = 'all', $has_rtl = false ) {
- self::$styles[] = $handle;
- wp_register_style( $handle, $path, $deps, $version, $media );
-
- if ( $has_rtl ) {
- wp_style_add_data( $handle, 'rtl', 'replace' );
- }
- }
-
- /**
- * Register and enqueue a styles for use.
- *
- * @uses wp_enqueue_style()
- * @param string $handle Name of the stylesheet. Should be unique.
- * @param string $path Full URL of the stylesheet, or path of the stylesheet relative to the WordPress root directory.
- * @param string[] $deps An array of registered stylesheet handles this stylesheet depends on.
- * @param string $version String specifying stylesheet version number, if it has one, which is added to the URL as a query string for cache busting purposes. If version is set to false, a version number is automatically added equal to current installed WordPress version. If set to null, no version is added.
- * @param string $media The media for which this stylesheet has been defined. Accepts media types like 'all', 'print' and 'screen', or media queries like '(orientation: portrait)' and '(max-width: 640px)'.
- * @param boolean $has_rtl If has RTL version to load too.
- */
- private static function enqueue_style( $handle, $path = '', $deps = array(), $version = EVF_VERSION, $media = 'all', $has_rtl = false ) {
- if ( ! in_array( $handle, self::$styles, true ) && $path ) {
- self::register_style( $handle, $path, $deps, $version, $media, $has_rtl );
- }
- wp_enqueue_style( $handle );
- }
-
- /**
- * Register all EVF scripts.
- */
- private static function register_scripts() {
- if ( evf_is_amp() ) {
- return;
- }
-
- $suffix = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min';
- $register_scripts = array(
- 'inputmask' => array(
- 'src' => self::get_asset_url( 'assets/js/inputmask/jquery.inputmask.bundle' . $suffix . '.js' ),
- 'deps' => array( 'jquery' ),
- 'version' => '4.0.0-beta.58',
- ),
- 'flatpickr' => array(
- 'src' => self::get_asset_url( 'assets/js/flatpickr/flatpickr' . $suffix . '.js' ),
- 'deps' => array( 'jquery' ),
- 'version' => '4.6.3',
- ),
- 'mailcheck' => array(
- 'src' => self::get_asset_url( 'assets/js/mailcheck/mailcheck' . $suffix . '.js' ),
- 'deps' => array( 'jquery' ),
- 'version' => '1.1.2',
- ),
- 'selectWoo' => array(
- 'src' => self::get_asset_url( 'assets/js/selectWoo/selectWoo.full' . $suffix . '.js' ),
- 'deps' => array( 'jquery' ),
- 'version' => '1.0.8',
- ),
- 'jquery-intl-tel-input' => array(
- 'src' => self::get_asset_url( '/assets/js/intlTelInput/jquery.intlTelInput' . $suffix . '.js ' ),
- 'deps' => array( 'jquery' ),
- 'version' => '16.0.7',
- ),
- 'jquery-validate' => array(
- 'src' => self::get_asset_url( 'assets/js/jquery-validate/jquery.validate' . $suffix . '.js' ),
- 'deps' => array( 'jquery' ),
- 'version' => '1.19.2',
- ),
- 'everest-forms' => array(
- 'src' => self::get_asset_url( 'assets/js/frontend/everest-forms' . $suffix . '.js' ),
- 'deps' => array( 'jquery', 'inputmask', 'jquery-validate', 'jquery-intl-tel-input', 'selectWoo' ),
- 'version' => EVF_VERSION,
- ),
- 'everest-forms-text-limit' => array(
- 'src' => self::get_asset_url( 'assets/js/frontend/text-limit' . $suffix . '.js' ),
- 'deps' => array(),
- 'version' => EVF_VERSION,
- ),
- 'everest-forms-ajax-submission' => array(
- 'src' => self::get_asset_url( 'assets/js/frontend/ajax-submission' . $suffix . '.js' ),
- 'deps' => array( 'jquery', 'inputmask', 'jquery-validate' ),
- 'version' => EVF_VERSION,
- ),
- 'everest-forms-survey-polls-quiz-script' => array(
- 'src' => self::get_asset_url( 'assets/js/frontend/everest-forms-survey-polls-quiz' . $suffix . '.js' ),
- 'deps' => array(),
- 'version' => EVF_VERSION,
- ),
- );
- foreach ( $register_scripts as $name => $props ) {
- self::register_script( $name, $props['src'], $props['deps'], $props['version'] );
- }
- }
-
- /**
- * Register all EVF sty;es.
- */
- private static function register_styles() {
- $register_styles = array(
- 'evf_select2' => array(
- 'src' => self::get_asset_url( 'assets/css/select2.css' ),
- 'deps' => array(),
- 'version' => EVF_VERSION,
- 'has_rtl' => false,
- ),
- 'flatpickr' => array(
- 'src' => self::get_asset_url( 'assets/css/flatpickr.css' ),
- 'deps' => array(),
- 'version' => EVF_VERSION,
- 'has_rtl' => false,
- ),
- 'jquery-intl-tel-input' => array(
- 'src' => self::get_asset_url( 'assets/css/intlTelInput.css' ),
- 'deps' => array(),
- 'version' => EVF_VERSION,
- 'has_rtl' => false,
- ),
- );
- foreach ( $register_styles as $name => $props ) {
- self::register_style( $name, $props['src'], $props['deps'], $props['version'], 'all', $props['has_rtl'] );
- }
- }
-
- /**
- * Register/queue frontend scripts.
- */
- public static function load_scripts() {
- global $post;
-
- if ( ! did_action( 'before_everest_forms_init' ) ) {
- return;
- }
-
- self::register_scripts();
- self::register_styles();
-
- // Enqueue dashicons.
- // wp_enqueue_style( 'dashicons' );
-
- // CSS Styles.
- $enqueue_styles = self::get_styles();
- if ( $enqueue_styles ) {
- foreach ( $enqueue_styles as $handle => $args ) {
- if ( ! isset( $args['has_rtl'] ) ) {
- $args['has_rtl'] = false;
- }
-
- self::enqueue_style( $handle, $args['src'], $args['deps'], $args['version'], $args['media'], $args['has_rtl'] );
- }
- }
- }
-
- /**
- * Localize a EVF script once.
- *
- * @param string $handle Script handle the data will be attached to.
- */
- private static function localize_script( $handle ) {
- if ( ! in_array( $handle, self::$wp_localize_scripts, true ) && wp_script_is( $handle ) ) {
- $data = self::get_script_data( $handle );
-
- if ( ! $data ) {
- return;
- }
-
- $name = str_replace( '-', '_', $handle ) . '_params';
- self::$wp_localize_scripts[] = $handle;
- wp_localize_script( $handle, $name, apply_filters( $name, $data ) );
- }
- }
-
- /**
- * Return data for script handles.
- *
- * @param string $handle Script handle the data will be attached to.
- * @return array|bool
- */
- private static function get_script_data( $handle ) {
- switch ( $handle ) {
- case 'everest-forms':
- $params = array(
- 'ajax_url' => evf()->ajax_url(),
- 'submit' => esc_html__( 'Submit', 'everest-forms' ),
- 'disable_user_details' => get_option( 'everest_forms_disable_user_details' ),
- 'everest_forms_data_save' => wp_create_nonce( 'everest_forms_data_save_nonce' ),
- 'everest_forms_slot_booking' => wp_create_nonce( 'everest_forms_slot_booking_nonce' ),
- 'i18n_messages_required' => get_option( 'everest_forms_required_validation' ),
- 'i18n_messages_url' => get_option( 'everest_forms_url_validation' ),
- 'i18n_messages_email' => get_option( 'everest_forms_email_validation' ),
- 'i18n_messages_email_suggestion' => get_option( 'everest_forms_email_suggestion', esc_html__( 'Did you mean {suggestion}?', 'everest-forms' ) ),
- 'i18n_messages_email_suggestion_title' => esc_attr__( 'Click to accept this suggestion.', 'everest-forms' ),
- 'i18n_messages_confirm' => get_option( 'everest_forms_confirm_validation', __( 'Field values do not match.', 'everest-forms' ) ),
- 'i18n_messages_check_limit' => get_option( 'everest_forms_check_limit_validation', esc_html__( 'You have exceeded number of allowed selections: {#}.', 'everest-forms' ) ),
- 'i18n_messages_number' => get_option( 'everest_forms_number_validation' ),
- 'i18n_no_matches' => _x( 'No matches found', 'enhanced select', 'everest-forms' ),
- 'mailcheck_enabled' => (bool) apply_filters( 'everest_forms_mailcheck_enabled', true ),
- 'mailcheck_domains' => array_map( 'sanitize_text_field', (array) apply_filters( 'everest_forms_mailcheck_domains', array() ) ),
- 'mailcheck_toplevel_domains' => array_map( 'sanitize_text_field', (array) apply_filters( 'everest_forms_mailcheck_toplevel_domains', array( 'dev' ) ) ),
- 'il8n_min_word_length_err_msg' => esc_html__( 'Please enter at least {0} words.', 'everest-forms' ),
- 'il8n_min_character_length_err_msg' => esc_html__( 'Please enter at least {0} characters.', 'everest-forms' ),
- 'plugin_url' => plugin_dir_url( EVF_PLUGIN_FILE ),
- 'i18n_messages_phone' => get_option( 'everest_forms_phone_validation', __( 'Please enter a valid phone number.', 'everest-forms' ) ),
- 'i18n_field_rating_greater_than_max_value_error' => esc_html__( 'Please enter in a value less than 100.', 'everest-forms' ),
- );
- break;
- case 'everest-forms-text-limit':
- $params = array(
- 'i18n_messages_limit_characters' => esc_html__( '{count} of {limit} max characters.', 'everest-forms' ),
- 'i18n_messages_limit_words' => esc_html__( '{count} of {limit} max words.', 'everest-forms' ),
- );
- break;
- case 'everest-forms-ajax-submission':
- $params = array(
- 'ajax_url' => admin_url( 'admin-ajax.php' ),
- 'evf_ajax_submission' => wp_create_nonce( 'everest_forms_ajax_form_submission' ),
- 'submit' => esc_html__( 'Submit', 'everest-forms' ),
- 'error' => esc_html__( 'Something went wrong while making an AJAX submission', 'everest-forms' ),
- 'required' => esc_html__( 'This field is required.', 'everest-forms' ),
- 'pdf_download' => esc_html__( 'Click here to download your pdf submission', 'everest-forms' ),
- );
- break;
- case 'everest-forms-survey-polls-quiz-script':
- $params = array(
- 'ajax_url' => admin_url( 'admin-ajax.php', 'relative' ),
- 'ajax_nonce' => wp_create_nonce( 'process-ajax-nonce' ),
- 'form_id' => isset( $_GET['form_id'] ) ? wp_unslash( $_GET['form_id'] ) : '', // WPCS: CSRF ok, input var ok, sanitization ok.
- );
- break;
- default:
- $params = false;
- }
-
- return apply_filters( 'everest_forms_get_script_data', $params, $handle );
- }
-
- /**
- * Localize scripts only when enqueued.
- */
- public static function localize_printed_scripts() {
- foreach ( self::$scripts as $handle ) {
- self::localize_script( $handle );
- }
- }
-}
-
-EVF_Frontend_Scripts::init();
From d0c0c59b789e19878ef133d9b575f8be3324fcc2 Mon Sep 17 00:00:00 2001
From: Deependra Chaudhary
Date: Thu, 30 May 2024 09:43:11 +0545
Subject: [PATCH 04/32] Fix - checkbox limit issue
---
assets/js/frontend/everest-forms.js | 2 +-
assets/js/frontend/everest-forms.min.js | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/assets/js/frontend/everest-forms.js b/assets/js/frontend/everest-forms.js
index 1898835db..f8dc42bbc 100644
--- a/assets/js/frontend/everest-forms.js
+++ b/assets/js/frontend/everest-forms.js
@@ -405,7 +405,7 @@ jQuery( function ( $ ) {
return $checked.length <= choiceLimit;
}, function( params, element ) {
var choiceLimit = parseInt( $( element ).closest( 'ul' ).attr( 'data-choice-limit' ) || 0, 10 );
- return everest_forms.i18n_messages_check_limit.replace( '{#}', choiceLimit );
+ return everest_forms_params.i18n_messages_check_limit.replace( '{#}', choiceLimit );
} );
$.validator.addMethod( 'phone-field', function( value, element ) {
diff --git a/assets/js/frontend/everest-forms.min.js b/assets/js/frontend/everest-forms.min.js
index 11c053db3..6a8e506b2 100644
--- a/assets/js/frontend/everest-forms.min.js
+++ b/assets/js/frontend/everest-forms.min.js
@@ -1 +1 @@
-jQuery(function(f){"use strict";if("undefined"==typeof everest_forms_params)return!1;var t=function(){return{language:{noResults:function(){return everest_forms_params.i18n_no_matches}}}},l={$everest_form:f("form.everest-form"),init:function(){this.init_inputMask(),this.init_mailcheck(),this.init_datepicker(),this.init_datedropdown(),this.load_validation(),this.submission_scroll(),this.randomize_elements(),this.init_enhanced_select(),this.checkUncheckAllcheckbox(),this.validateMinimumWordLength(),this.validateMinimumcharacterLength(),this.loadPhoneField(),this.loadCountryFlags(),this.ratingInit(),this.$everest_form.on("input validate change",".input-text, select, input:checkbox, input:radio",this.validate_field),this.$everest_form.on("focusin",'.input-text, select, input[type="checkbox"], input[type="radio"]',function(){f(this).addClass("everest-forms-field-active")}).on("focusout",'.input-text, select, input[type="checkbox"], input[type="radio"]',function(){f(this).removeClass("everest-forms-field-active")}),f(document.body).trigger("everest_forms_loaded")},init_inputMask:function(){"undefined"!=typeof f.fn.inputmask&&f(".evf-masked-input").inputmask()},init_mailcheck:function(){"undefined"!=typeof f.fn.mailcheck&&everest_forms_params.mailcheck_enabled&&(0'+t.full+"");(e.parents("span.input-wrapper").length?f(e).parents("span.input-wrapper"):f(e)).after('")},empty:function(){f("#"+i+"_suggestion").remove()}})}),f(document).on("click",".evf-field-email .mailcheck-suggestion",function(e){var t=f(this),i=t.attr("data-id");e.preventDefault(),f("#"+i).val(t.text()),t.parent().remove()}))},init_datepicker:function(){var e=f(".evf-field-date-time");e.length&&e.find(".flatpickr-field").length&&e.find(".flatpickr-field").each(function(){var e,t=5,i=f(this).data(),a=[],s="",r=(i.minDateRange&&(s="today")!==i.minDateRange&&(s=/^\s*[-+]?\d+\s*d/i.test(i.minDateRange)?(s=i.minDateRange.match(/^\s*[-+]?\d+\s*d/i)[0].replace("d",""),(new Date).fp_incr(s)):"today"),"");switch(i.maxDateRange&&(r="today")!==i.maxDateRange&&(r=/^\s*[-+]?\d+\s*d/i.test(i.maxDateRange)?(r=i.maxDateRange.match(/^\s*[-+]?\d+\s*d/i)[0].replace("d",""),(new Date).fp_incr(r)):""),i.disableDates&&(a=i.disableDates.split(",")),e=i.pastDisableDate||"",i.dateTime){case"date":f(this).flatpickr({disableMobile:!0,mode:i.mode,minDate:s||i.minDate||e,maxDate:r||i.maxDate,dateFormat:i.dateFormat,disable:a});break;case"time":undefined!==i.timeInterval&&(t=parseInt(i.timeInterval,10)),f(this).flatpickr({enableTime:!0,noCalendar:!0,minuteIncrement:t,dateFormat:i.dateFormat,disableMobile:!0,time_24hr:i.dateFormat.includes("H:i")});break;case"date-time":undefined!==i.timeInterval&&(t=parseInt(i.timeInterval,10)),f(this).flatpickr({enableTime:!0,noCalendar:!1,disableMobile:!0,mode:i.mode,minDate:s||i.minDate||e,maxDate:r||i.maxDate,minuteIncrement:t,dateFormat:i.dateFormat,time_24hr:i.dateFormat.includes("H:i"),disable:a})}}),f(document).find(".evf-field-date-time input").on("change",function(e){var t=f(this).data("slot-booking"),i=f(this).parent(),a=f(this).parent().find("label.evf-error");1===t&&(t={action:"everest_forms_slot_booking","data-time-value":f(this).val(),"data-format":f(this).data("date-format"),"data-time-format":f(this).data("date-time"),mode:f(this).data("mode"),"form-id":f(this).data("form-id"),"time-interval":f(this).data("time-interval"),security:everest_forms_params.everest_forms_slot_booking},f.ajax({url:everest_forms_params.ajax_url,data:t,type:"POST",beforeSend:function(){var e=f(document).find(".evf-submit-container button");f(e).prop("disabled",!0)},success:function(e){var t;f(a).length&&f(a).remove(),!0===e.success?(e=e.data.message,f(i).append('"),t=f(document).find(".evf-submit-container button"),f(t).prop("disabled",!0)):(t=f(document).find(".evf-submit-container button"),f(t).prop("disabled",!1))}}))})},init_datedropdown:function(){f(".date-dropdown-field").each(function(){var e=f(this);e.hide(),l.change_minutes(e)}),f("body").on("change",".date-time-container [id*=hour-select]",function(){var e=f(this).siblings("input.date-dropdown-field");l.change_minutes(e)}),f("body").on("change",".date-time-container [id*=-select]",function(){var e=f(this).siblings("input.date-dropdown-field");e.val(l.format_dropdown_date(e))})},change_minutes:function(e){var t=e.attr("id");if(void 0!==e.siblings("#minute-select-"+t).attr("id")){for(var i=e.attr("data-max-hour"),a=e.attr("data-min-hour"),s=e.attr("data-max-minute"),r=e.attr("data-min-minute"),n=(void 0!==a&&""!=a||(a=0),void 0!==i&&""!=i||(a=23),void 0!==r&&""!=r||(r=0),void 0!==s&&""!=s||(s=59),""),d=0;d<=59;d++)if(!(e.siblings("#hour-select-"+t).val()==a&&d '+(d<10?"0"+d:d)+""}e.siblings("#minute-select-"+t).html(n),e.siblings("#minute-select-"+t).attr("value",e.siblings("#minute-select-"+t).find("option:first").val())}e.val(l.format_dropdown_date(e))},format_dropdown_date:function(e){var t=e.attr("id"),t={selected_year:e.siblings("#year-select-"+t).val(),selected_month:e.siblings("#month-select-"+t).val(),selected_day:e.siblings("#day-select-"+t).val(),selected_hour:e.siblings("#hour-select-"+t).val(),selected_minute:e.siblings("#minute-select-"+t).val()},e={date_format:e.attr("data-date-format"),date_time:e.attr("data-date-time")},i="";return"date"!=e.date_time&&"date-time"!=e.date_time||(t.selected_day=t.selected_day<10?"0"+t.selected_day:t.selected_day,i=e.date_format.match(/F j, Y/)?["January","Febuary","March","April","May","June","July","August","September","October","November","December"][parseInt(t.selected_month)-1]+" "+t.selected_day+", "+t.selected_year:(t.selected_month=t.selected_month<10?"0"+t.selected_month:t.selected_month,e.date_format.match(/Y-m-d/)?t.selected_year+"-"+t.selected_month+"-"+t.selected_day:e.date_format.match(/m\/d\/Y/)?t.selected_month+"/"+t.selected_day+"/"+t.selected_year:t.selected_day+"/"+t.selected_month+"/"+t.selected_year)),"time"!=e.date_time&&"date-time"!=e.date_time||(t.selected_minute=t.selected_minute<10?"0"+t.selected_minute:t.selected_minute,e.date_format.match(/H:i/)?(t.selected_hour=t.selected_hour<10?"0"+t.selected_hour:t.selected_hour,i+=" "+t.selected_hour+":"+t.selected_minute):(e="PM",t.selected_hour<12?(e="AM",0==t.selected_hour&&(t.selected_hour=12)):12=i[0]},everest_forms_params.il8n_min_word_length_err_msg),jQuery("#"+e.id).each(function(){jQuery(this).rules("add",{minWordLength:[t]})})})},validateMinimumcharacterLength:function(){Array.prototype.slice.call(document.querySelectorAll(".everest-forms-min-characters-length-enabled")).map(function(e){var t=parseInt(e.dataset.textMinLength,10)||0;jQuery.validator.addMethod("minCharacterLength",function(e,t,i){return e.length>=i[0]},everest_forms_params.il8n_min_character_length_err_msg),jQuery("#"+e.id).each(function(){jQuery(this).rules("add",{minCharacterLength:[t]})})})},loadPhoneField:function(){var e,t,a={};if("undefined"==typeof f.fn.intlTelInput)return!1;"yes"!==everest_forms_params.disable_user_details&&(a.geoIpLookup=l.currentIpToCountry),"yes"===everest_forms_params.disable_user_details&&(e=this.getFirstBrowserLanguage(),t=-1'+e.text+""):e.text},ratingInit:function(){f(".everest-forms-field-rating").hover(function(){f(this).parent().find(".everest-forms-field-rating").removeClass("selected hover"),f(this).prevAll().addBack().addClass("hover")},function(){f(this).parent().find(".everest-forms-field-rating").removeClass("selected hover"),f(this).parent().find("input:checked").parent().prevAll().addBack().addClass("selected")}),f(document).on("change",".everest-forms-field-rating input",function(){var e=f(this);e.closest(".everest-forms-field-rating-container").find(".everest-forms-field-rating").removeClass("hover selected"),e.parent().prevAll().addBack().addClass("selected")}),f(document).ready(function(){f(".everest-forms-field-rating input:checked").trigger("change")})}};l.init()});
\ No newline at end of file
+jQuery(function(f){"use strict";if("undefined"==typeof everest_forms_params)return!1;var t=function(){return{language:{noResults:function(){return everest_forms_params.i18n_no_matches}}}},l={$everest_form:f("form.everest-form"),init:function(){this.init_inputMask(),this.init_mailcheck(),this.init_datepicker(),this.init_datedropdown(),this.load_validation(),this.submission_scroll(),this.randomize_elements(),this.init_enhanced_select(),this.checkUncheckAllcheckbox(),this.validateMinimumWordLength(),this.validateMinimumcharacterLength(),this.loadPhoneField(),this.loadCountryFlags(),this.ratingInit(),this.$everest_form.on("input validate change",".input-text, select, input:checkbox, input:radio",this.validate_field),this.$everest_form.on("focusin",'.input-text, select, input[type="checkbox"], input[type="radio"]',function(){f(this).addClass("everest-forms-field-active")}).on("focusout",'.input-text, select, input[type="checkbox"], input[type="radio"]',function(){f(this).removeClass("everest-forms-field-active")}),f(document.body).trigger("everest_forms_loaded")},init_inputMask:function(){"undefined"!=typeof f.fn.inputmask&&f(".evf-masked-input").inputmask()},init_mailcheck:function(){"undefined"!=typeof f.fn.mailcheck&&everest_forms_params.mailcheck_enabled&&(0'+t.full+"");(e.parents("span.input-wrapper").length?f(e).parents("span.input-wrapper"):f(e)).after('")},empty:function(){f("#"+i+"_suggestion").remove()}})}),f(document).on("click",".evf-field-email .mailcheck-suggestion",function(e){var t=f(this),i=t.attr("data-id");e.preventDefault(),f("#"+i).val(t.text()),t.parent().remove()}))},init_datepicker:function(){var e=f(".evf-field-date-time");e.length&&e.find(".flatpickr-field").length&&e.find(".flatpickr-field").each(function(){var e,t=5,i=f(this).data(),a=[],s="",r=(i.minDateRange&&(s="today")!==i.minDateRange&&(s=/^\s*[-+]?\d+\s*d/i.test(i.minDateRange)?(s=i.minDateRange.match(/^\s*[-+]?\d+\s*d/i)[0].replace("d",""),(new Date).fp_incr(s)):"today"),"");switch(i.maxDateRange&&(r="today")!==i.maxDateRange&&(r=/^\s*[-+]?\d+\s*d/i.test(i.maxDateRange)?(r=i.maxDateRange.match(/^\s*[-+]?\d+\s*d/i)[0].replace("d",""),(new Date).fp_incr(r)):""),i.disableDates&&(a=i.disableDates.split(",")),e=i.pastDisableDate||"",i.dateTime){case"date":f(this).flatpickr({disableMobile:!0,mode:i.mode,minDate:s||i.minDate||e,maxDate:r||i.maxDate,dateFormat:i.dateFormat,disable:a});break;case"time":undefined!==i.timeInterval&&(t=parseInt(i.timeInterval,10)),f(this).flatpickr({enableTime:!0,noCalendar:!0,minuteIncrement:t,dateFormat:i.dateFormat,disableMobile:!0,time_24hr:i.dateFormat.includes("H:i")});break;case"date-time":undefined!==i.timeInterval&&(t=parseInt(i.timeInterval,10)),f(this).flatpickr({enableTime:!0,noCalendar:!1,disableMobile:!0,mode:i.mode,minDate:s||i.minDate||e,maxDate:r||i.maxDate,minuteIncrement:t,dateFormat:i.dateFormat,time_24hr:i.dateFormat.includes("H:i"),disable:a})}}),f(document).find(".evf-field-date-time input").on("change",function(e){var t=f(this).data("slot-booking"),i=f(this).parent(),a=f(this).parent().find("label.evf-error");1===t&&(t={action:"everest_forms_slot_booking","data-time-value":f(this).val(),"data-format":f(this).data("date-format"),"data-time-format":f(this).data("date-time"),mode:f(this).data("mode"),"form-id":f(this).data("form-id"),"time-interval":f(this).data("time-interval"),security:everest_forms_params.everest_forms_slot_booking},f.ajax({url:everest_forms_params.ajax_url,data:t,type:"POST",beforeSend:function(){var e=f(document).find(".evf-submit-container button");f(e).prop("disabled",!0)},success:function(e){var t;f(a).length&&f(a).remove(),!0===e.success?(e=e.data.message,f(i).append('"),t=f(document).find(".evf-submit-container button"),f(t).prop("disabled",!0)):(t=f(document).find(".evf-submit-container button"),f(t).prop("disabled",!1))}}))})},init_datedropdown:function(){f(".date-dropdown-field").each(function(){var e=f(this);e.hide(),l.change_minutes(e)}),f("body").on("change",".date-time-container [id*=hour-select]",function(){var e=f(this).siblings("input.date-dropdown-field");l.change_minutes(e)}),f("body").on("change",".date-time-container [id*=-select]",function(){var e=f(this).siblings("input.date-dropdown-field");e.val(l.format_dropdown_date(e))})},change_minutes:function(e){var t=e.attr("id");if(void 0!==e.siblings("#minute-select-"+t).attr("id")){for(var i=e.attr("data-max-hour"),a=e.attr("data-min-hour"),s=e.attr("data-max-minute"),r=e.attr("data-min-minute"),n=(void 0!==a&&""!=a||(a=0),void 0!==i&&""!=i||(a=23),void 0!==r&&""!=r||(r=0),void 0!==s&&""!=s||(s=59),""),d=0;d<=59;d++)if(!(e.siblings("#hour-select-"+t).val()==a&&d '+(d<10?"0"+d:d)+""}e.siblings("#minute-select-"+t).html(n),e.siblings("#minute-select-"+t).attr("value",e.siblings("#minute-select-"+t).find("option:first").val())}e.val(l.format_dropdown_date(e))},format_dropdown_date:function(e){var t=e.attr("id"),t={selected_year:e.siblings("#year-select-"+t).val(),selected_month:e.siblings("#month-select-"+t).val(),selected_day:e.siblings("#day-select-"+t).val(),selected_hour:e.siblings("#hour-select-"+t).val(),selected_minute:e.siblings("#minute-select-"+t).val()},e={date_format:e.attr("data-date-format"),date_time:e.attr("data-date-time")},i="";return"date"!=e.date_time&&"date-time"!=e.date_time||(t.selected_day=t.selected_day<10?"0"+t.selected_day:t.selected_day,i=e.date_format.match(/F j, Y/)?["January","Febuary","March","April","May","June","July","August","September","October","November","December"][parseInt(t.selected_month)-1]+" "+t.selected_day+", "+t.selected_year:(t.selected_month=t.selected_month<10?"0"+t.selected_month:t.selected_month,e.date_format.match(/Y-m-d/)?t.selected_year+"-"+t.selected_month+"-"+t.selected_day:e.date_format.match(/m\/d\/Y/)?t.selected_month+"/"+t.selected_day+"/"+t.selected_year:t.selected_day+"/"+t.selected_month+"/"+t.selected_year)),"time"!=e.date_time&&"date-time"!=e.date_time||(t.selected_minute=t.selected_minute<10?"0"+t.selected_minute:t.selected_minute,e.date_format.match(/H:i/)?(t.selected_hour=t.selected_hour<10?"0"+t.selected_hour:t.selected_hour,i+=" "+t.selected_hour+":"+t.selected_minute):(e="PM",t.selected_hour<12?(e="AM",0==t.selected_hour&&(t.selected_hour=12)):12=i[0]},everest_forms_params.il8n_min_word_length_err_msg),jQuery("#"+e.id).each(function(){jQuery(this).rules("add",{minWordLength:[t]})})})},validateMinimumcharacterLength:function(){Array.prototype.slice.call(document.querySelectorAll(".everest-forms-min-characters-length-enabled")).map(function(e){var t=parseInt(e.dataset.textMinLength,10)||0;jQuery.validator.addMethod("minCharacterLength",function(e,t,i){return e.length>=i[0]},everest_forms_params.il8n_min_character_length_err_msg),jQuery("#"+e.id).each(function(){jQuery(this).rules("add",{minCharacterLength:[t]})})})},loadPhoneField:function(){var e,t,a={};if("undefined"==typeof f.fn.intlTelInput)return!1;"yes"!==everest_forms_params.disable_user_details&&(a.geoIpLookup=l.currentIpToCountry),"yes"===everest_forms_params.disable_user_details&&(e=this.getFirstBrowserLanguage(),t=-1'+e.text+""):e.text},ratingInit:function(){f(".everest-forms-field-rating").hover(function(){f(this).parent().find(".everest-forms-field-rating").removeClass("selected hover"),f(this).prevAll().addBack().addClass("hover")},function(){f(this).parent().find(".everest-forms-field-rating").removeClass("selected hover"),f(this).parent().find("input:checked").parent().prevAll().addBack().addClass("selected")}),f(document).on("change",".everest-forms-field-rating input",function(){var e=f(this);e.closest(".everest-forms-field-rating-container").find(".everest-forms-field-rating").removeClass("hover selected"),e.parent().prevAll().addBack().addClass("selected")}),f(document).ready(function(){f(".everest-forms-field-rating input:checked").trigger("change")})}};l.init()});
\ No newline at end of file
From c04da744121d8d516f806076e3cad820747ceb4b Mon Sep 17 00:00:00 2001
From: Deependra Chaudhary
Date: Mon, 3 Jun 2024 10:28:59 +0545
Subject: [PATCH 05/32] Fix - missing browser language
---
assets/js/frontend/everest-forms.js | 28 +++++++++++++++++++++++++
assets/js/frontend/everest-forms.min.js | 2 +-
2 files changed, 29 insertions(+), 1 deletion(-)
diff --git a/assets/js/frontend/everest-forms.js b/assets/js/frontend/everest-forms.js
index f8dc42bbc..5065dd088 100644
--- a/assets/js/frontend/everest-forms.js
+++ b/assets/js/frontend/everest-forms.js
@@ -948,6 +948,34 @@ jQuery( function ( $ ) {
}
return $( '