diff --git a/docs/changelog.md b/docs/changelog.md index 7e28cb99..856cc7bf 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -9,7 +9,7 @@ - [PDF Generator Add-on](https://renstillmann.github.io/super-forms/#/pdf-generator-add-on) -## May 31, 2023 - Version 6.3.724 +## Jun 02, 2023 - Version 6.3.725 - **Added:** Option to create vCards and attach them to Admin and Confirmation E-mails via `Form settings > vCard Attachment` - **Added:** New `Signature` drawing method for improved device compatibility (Microsoft Surface Pro) @@ -49,6 +49,7 @@ endforeach; - **Fix:** Issue when dragging elements inside column that are inside an Accordion/TAB element - **Fix:** Issue with using `foreach loop` inside E-mails not replacing the tags with field value correctly - **Fix:** New signature mobile canvas width not adjusting properly +- **Fix:** Conditional logic conflict with columns that are set to be hidden in some scenario's ## Dec 21, 2022 - Version 6.3.679 diff --git a/src/add-ons/super-forms-calculator/assets/js/frontend/calculator.js b/src/add-ons/super-forms-calculator/assets/js/frontend/calculator.js index c1817ecf..28171e69 100644 --- a/src/add-ons/super-forms-calculator/assets/js/frontend/calculator.js +++ b/src/add-ons/super-forms-calculator/assets/js/frontend/calculator.js @@ -107,7 +107,7 @@ // @since 1.5.0 - skip if parent column or element is hidden (conditionally hidden) if(typeof doNotSkip === 'undefined') { - if(SUPER.has_hidden_parent(target)){ + if(SUPER.has_hidden_parent(target, false, false)){ continue; } } @@ -301,7 +301,7 @@ } // Check if parent column or element is hidden (conditionally hidden) - if(SUPER.has_hidden_parent(element)){ + if(SUPER.has_hidden_parent(element,false,false)){ // Exclude conditionally // Lets just replace the field name with 0 as a value numericMath = target.dataset.superNumericMath.replace('{'+oldName+'}', 0); diff --git a/src/add-ons/super-forms-signature/assets/js/frontend/signature.js b/src/add-ons/super-forms-signature/assets/js/frontend/signature.js index 2a168b26..29106c8f 100644 --- a/src/add-ons/super-forms-signature/assets/js/frontend/signature.js +++ b/src/add-ons/super-forms-signature/assets/js/frontend/signature.js @@ -64,7 +64,7 @@ var wrapper = signaturePad.canvas.closest('.super-field-wrapper'); signaturePad.addEventListener('afterUpdateStroke', () => { var field = wrapper.querySelector('.super-shortcode-field'); - if(signaturePad.isEmpty()==false){ + if(signaturePad.isEmpty()===false){ if(!signaturePad.canvas.closest('.super-signature').classList.contains('super-filled')){ signaturePad.canvas.closest('.super-signature').classList.add('super-filled'); } @@ -90,7 +90,7 @@ }); } }; - SUPER.getSignatureDimensions = function(field, signaturePad, successCallback, errorCallback){ + SUPER.getSignatureDimensions = function(field, signaturePad, successCallback){ var img = new Image(); img.onload = function() { successCallback(field, signaturePad, { width: img.width, height: img.height }); diff --git a/src/assets/js/common.js b/src/assets/js/common.js index 5540536e..befb2491 100644 --- a/src/assets/js/common.js +++ b/src/assets/js/common.js @@ -781,7 +781,7 @@ function SUPERreCaptcha(){ SUPER.field_isset = function(form, name, regex){ var el = SUPER.field(form, name, regex); if(!el) return 0; // does not exist, is not set - if(SUPER.has_hidden_parent(el)) { + if(SUPER.has_hidden_parent(el,false,false)) { return 0; // was conditionally hidden } return 1; @@ -1885,7 +1885,7 @@ function SUPERreCaptcha(){ $continue = true; continue; } - $skip = SUPER.has_hidden_parent($shortcode_field); + $skip = SUPER.has_hidden_parent($shortcode_field, false, false); $parent = $shortcode_field.closest('.super-shortcode'); } if(v.a!==''){ @@ -1904,7 +1904,7 @@ function SUPERreCaptcha(){ $continue_and = true; continue; } - $skip_and = SUPER.has_hidden_parent($shortcode_field_and); + $skip_and = SUPER.has_hidden_parent($shortcode_field_and, false, false); $parent_and = $shortcode_field_and.closest('.super-shortcode'); } if(v.a==='or' && !$continue_and){ diff --git a/src/assets/js/frontend/elements.js b/src/assets/js/frontend/elements.js index ddb41e3b..7b5a332e 100644 --- a/src/assets/js/frontend/elements.js +++ b/src/assets/js/frontend/elements.js @@ -2106,7 +2106,6 @@ }); $doc.on('click', '.super-form .super-duplicate-column-fields .super-add-duplicate', function(){ - debugger; var i, x, nodes, el, parent, column, form, firstColumn, lastColumn, found, limit, unique_field_names = {}, field_names = {}, field_labels = {}, counter = 0, field, clone, added_fields_with_suffix = {}, foundElements = [], html_fields, suffix, name, @@ -2145,26 +2144,18 @@ counter = column.querySelectorAll(':scope > .super-duplicate-column-fields, :scope > .super-column-custom-padding > .super-duplicate-column-fields').length; clone = firstColumn.cloneNode(true); lastColumn = duplicateColumns[(found-1)]; - debugger; lastColumn.parentNode.insertBefore(clone, lastColumn.nextElementSibling); // @since 3.3.0 - hook after appending new column - debugger; SUPER.after_appending_duplicated_column_hook(form, unique_field_names, clone); // Now reset field values to default - debugger; SUPER.init_clear_form({form: form, clone: clone}); // First rename then loop through conditional logic and update names, otherwise we might think that the field didn't exist! // Loop over all fields that are inside dynamic column and rename them accordingly - debugger; SUPER.append_dynamic_column_depth({form: form, clone: clone}); - debugger; SUPER.init_common_fields(); - debugger; SUPER.init_replace_html_tags({el: undefined, form: clone}); - debugger; SUPER.after_duplicating_column_hook(form, unique_field_names, clone); - debugger; SUPER.after_field_change_blur_hook({form: clone, el: undefined}); }); diff --git a/src/docs/changelog.md b/src/docs/changelog.md index 7e28cb99..856cc7bf 100644 --- a/src/docs/changelog.md +++ b/src/docs/changelog.md @@ -9,7 +9,7 @@ - [PDF Generator Add-on](https://renstillmann.github.io/super-forms/#/pdf-generator-add-on) -## May 31, 2023 - Version 6.3.724 +## Jun 02, 2023 - Version 6.3.725 - **Added:** Option to create vCards and attach them to Admin and Confirmation E-mails via `Form settings > vCard Attachment` - **Added:** New `Signature` drawing method for improved device compatibility (Microsoft Surface Pro) @@ -49,6 +49,7 @@ endforeach; - **Fix:** Issue when dragging elements inside column that are inside an Accordion/TAB element - **Fix:** Issue with using `foreach loop` inside E-mails not replacing the tags with field value correctly - **Fix:** New signature mobile canvas width not adjusting properly +- **Fix:** Conditional logic conflict with columns that are set to be hidden in some scenario's ## Dec 21, 2022 - Version 6.3.679 diff --git a/src/includes/extensions/stripe/stripe.php b/src/includes/extensions/stripe/stripe.php index f8e78e84..4cd44a56 100644 --- a/src/includes/extensions/stripe/stripe.php +++ b/src/includes/extensions/stripe/stripe.php @@ -309,58 +309,55 @@ private function init_hooks() { add_action( 'super_before_redirect_action', array( $this, 'redirect_to_stripe_checkout' ) ); - add_action( 'init', array( $this, 'register_post_types' ), 5 ); - add_filter( 'super_shortcodes_after_form_elements_filter', array( $this, 'add_stripe_element' ), 10, 2 ); + //add_action( 'init', array( $this, 'register_post_types' ), 5 ); + //add_filter( 'super_shortcodes_after_form_elements_filter', array( $this, 'add_stripe_element' ), 10, 2 ); add_action( 'wp_head', array( $this, 'stripe_ipn')); if ( $this->is_request( 'admin' ) ) { add_filter( 'super_create_form_tabs', array( $this, 'add_tab' ), 10, 1 ); add_action( 'super_create_form_stripe_tab', array( $this, 'add_tab_content' ) ); - add_filter( 'manage_super_stripe_txn_posts_columns', array( $this, 'super_stripe_txn_columns' ), 999999 ); - add_action( 'manage_super_stripe_txn_posts_custom_column', array( $this, 'super_custom_columns' ), 10, 2 ); - add_action( 'manage_super_stripe_sub_posts_custom_column', array( $this, 'super_custom_columns' ), 10, 2 ); + // tmp add_filter( 'manage_super_stripe_txn_posts_columns', array( $this, 'super_stripe_txn_columns' ), 999999 ); + // tmp add_action( 'manage_super_stripe_txn_posts_custom_column', array( $this, 'super_custom_columns' ), 10, 2 ); + // tmp add_action( 'manage_super_stripe_sub_posts_custom_column', array( $this, 'super_custom_columns' ), 10, 2 ); //add_action( 'admin_menu', array( $this, 'register_menu' ), 20 ); add_filter( 'super_settings_after_custom_js_filter', array( $this, 'add_settings' ), 10, 2 ); - add_action( 'current_screen', array( $this, 'after_screen' ), 0 ); - add_filter( 'post_row_actions', array( $this, 'remove_row_actions' ), 10, 1 ); + //add_action( 'current_screen', array( $this, 'after_screen' ), 0 ); + //add_filter( 'post_row_actions', array( $this, 'remove_row_actions' ), 10, 1 ); add_action( 'after_contact_entry_metabox_hook', array( $this, 'add_transaction_link' ), 0 ); - add_filter( 'views_edit-super_stripe_txn', array( $this, 'delete_list_views_filter' ), 10, 1 ); + // tmp add_filter( 'views_edit-super_stripe_txn', array( $this, 'delete_list_views_filter' ), 10, 1 ); } - if ( $this->is_request( 'ajax' ) ) { - } - - add_action( 'wp_enqueue_scripts', array( $this, 'enqueue_scripts' ) ); + //add_action( 'wp_enqueue_scripts', array( $this, 'enqueue_scripts' ) ); //add_filter( 'super_redirect_url_filter', array( $this, 'stripe_redirect' ), 10, 2 ); //add_action( 'super_front_end_posting_after_insert_post_action', array( $this, 'save_post_id' ) ); //add_action( 'super_after_wp_insert_user_action', array( $this, 'save_user_id' ) ); - // add_action( 'super_stripe_webhook_payment_intent_succeeded', array( $this, 'payment_intent_succeeded' ), 10 ); + add_action( 'super_stripe_webhook_payment_intent_succeeded', array( $this, 'payment_intent_succeeded' ), 10 ); //add_action( 'super_stripe_webhook_payment_intent_created', array( $this, 'payment_intent_created' ), 10 ); //add_action( 'super_stripe_webhook_payment_intent_payment_failed', array( $this, 'payment_intent_payment_failed' ), 10 ); // Load more Transactions, Products, Customers - add_action( 'wp_ajax_super_stripe_api_handler', array( $this, 'super_stripe_api_handler' ) ); + // tmp add_action( 'wp_ajax_super_stripe_api_handler', array( $this, 'super_stripe_api_handler' ) ); // Prepare payment - add_action( 'wp_ajax_super_stripe_prepare_payment', array( $this, 'stripe_prepare_payment' ) ); - add_action( 'wp_ajax_nopriv_super_stripe_prepare_payment', array( $this, 'stripe_prepare_payment' ) ); + // tmp add_action( 'wp_ajax_super_stripe_prepare_payment', array( $this, 'stripe_prepare_payment' ) ); + // tmp add_action( 'wp_ajax_nopriv_super_stripe_prepare_payment', array( $this, 'stripe_prepare_payment' ) ); // Create customer - add_action( 'wp_ajax_super_stripe_create_subscription', array( $this, 'stripe_create_subscription' ) ); - add_action( 'wp_ajax_nopriv_super_stripe_create_subscription', array( $this, 'stripe_create_subscription' ) ); + // tmp add_action( 'wp_ajax_super_stripe_create_subscription', array( $this, 'stripe_create_subscription' ) ); + // tmp add_action( 'wp_ajax_nopriv_super_stripe_create_subscription', array( $this, 'stripe_create_subscription' ) ); // Filters since 1.2.3 - add_filter( 'super_common_js_dynamic_functions_filter', array( $this, 'add_dynamic_function' ), 100, 2 ); + // tmp add_filter( 'super_common_js_dynamic_functions_filter', array( $this, 'add_dynamic_function' ), 100, 2 ); - add_filter( 'super_form_styles_filter', array( $this, 'add_stripe_styles' ), 100, 2 ); - add_filter( 'super_enqueue_scripts', array( $this, 'super_enqueue_scripts' ), 10, 1 ); - add_filter( 'super_enqueue_styles', array( $this, 'super_enqueue_styles' ), 10, 1 ); + //add_filter( 'super_form_styles_filter', array( $this, 'add_stripe_styles' ), 100, 2 ); + //add_filter( 'super_enqueue_scripts', array( $this, 'super_enqueue_scripts' ), 10, 1 ); + //add_filter( 'super_enqueue_styles', array( $this, 'super_enqueue_styles' ), 10, 1 ); // Occurs whenever a pending charge is created. // The Charge is pending (asynchronous payments only). @@ -448,8 +445,12 @@ public static function add_tab_content($atts){ echo '' . esc_html__( 'If provided, this value will be used when the Customer object is created. If not provided, customers will be asked to enter their email address. Use this parameter to prefill customer data if you already have an email on file.', 'super-forms' ) . ''; echo ''; echo ''; + echo '
'; + echo ''; + echo '
'; echo ''; - echo '
'; echo '
'; - - echo '
'; - echo ''; - echo '
'; echo '
'; echo '