Plugin Directory

Changeset 3347189


Ignore:
Timestamp:
08/19/2025 05:53:09 PM (8 months ago)
Author:
mosparo
Message:

Release of v1.14.1

Location:
mosparo-integration
Files:
3 edited
65 copied

Legend:

Unmodified
Added
Removed
  • mosparo-integration/tags/1.14.1/mosparo-integration.php

    r3299719 r3347189  
    1515 * Author URI:        https://mosparo.io/
    1616 * License:           MIT
    17  * Version:           1.14.0
     17 * Version:           1.14.1
    1818 * Text Domain:       mosparo-integration
    1919 * Domain Path:       /languages
  • mosparo-integration/tags/1.14.1/readme.txt

    r3299719 r3347189  
    55Tested up to: 6.8.1
    66Requires PHP: 7.4
    7 Stable tag: 1.14.0
     7Stable tag: 1.14.1
    88License: MIT
    99
     
    105105== Changelog ==
    106106
     107= 1.14.1 =
     108*Release Date: 19th August 2025*
     109
     110* [Bugfix] Fixed a JavaScript error in the Gravity Forms module when the form is submitted via AJAX.
     111
    107112= 1.14.0 =
    108113*Release Date: 24th May 2025*
  • mosparo-integration/tags/1.14.1/src/MosparoIntegration/Helper/FrontendHelper.php

    r3299719 r3347189  
    246246
    247247        if (class_exists('GF_Field') && $field instanceof GF_Field) {
     248            $afterCode = '';
     249            if (is_admin()) {
     250                $afterCode = sprintf('
     251                    document.addEventListener("gform_field_added", function (event, form, field) {
     252                        if (field["type"] === "mosparo") {
     253                            initializeMosparo();
     254                        }
     255                    });
     256                   
     257                    if (typeof(gform) !== "undefined") {
     258                        gform.addAction("gform_after_refresh_field_preview", function (fieldId) {
     259                            let id = "mosparo-box-%s";
     260                            let eventFieldId = %d;
     261                           
     262                            if (fieldId !== eventFieldId) {
     263                                return;
     264                            }
     265                           
     266                            delete mosparoInstances[id];
     267                           
     268                            initializeMosparo();
     269                        });
     270                    }',
     271                    $instanceId,
     272                    $field->id
     273                );
     274            }
     275
    248276            return [
    249277                'before' => '
     
    258286                    };
    259287                    ',
    260                 'after' => sprintf('
    261                     document.addEventListener("gform_field_added", function (event, form, field) {
    262                         if (field["type"] === "mosparo") {
    263                             initializeMosparo();
    264                         }
    265                     });
    266                    
    267                     gform.addAction("gform_after_refresh_field_preview", function (fieldId) {
    268                         let id = "mosparo-box-%s";
    269                         let eventFieldId = %d;
    270                        
    271                         if (fieldId !== eventFieldId) {
    272                             return;
    273                         }
    274                        
    275                         delete mosparoInstances[id];
    276                        
    277                         initializeMosparo();
    278                     });', $instanceId, $field->id),
     288                'after' => $afterCode,
    279289            ];
    280290        }
  • mosparo-integration/trunk/mosparo-integration.php

    r3299719 r3347189  
    1515 * Author URI:        https://mosparo.io/
    1616 * License:           MIT
    17  * Version:           1.14.0
     17 * Version:           1.14.1
    1818 * Text Domain:       mosparo-integration
    1919 * Domain Path:       /languages
  • mosparo-integration/trunk/readme.txt

    r3299719 r3347189  
    55Tested up to: 6.8.1
    66Requires PHP: 7.4
    7 Stable tag: 1.14.0
     7Stable tag: 1.14.1
    88License: MIT
    99
     
    105105== Changelog ==
    106106
     107= 1.14.1 =
     108*Release Date: 19th August 2025*
     109
     110* [Bugfix] Fixed a JavaScript error in the Gravity Forms module when the form is submitted via AJAX.
     111
    107112= 1.14.0 =
    108113*Release Date: 24th May 2025*
  • mosparo-integration/trunk/src/MosparoIntegration/Helper/FrontendHelper.php

    r3299719 r3347189  
    246246
    247247        if (class_exists('GF_Field') && $field instanceof GF_Field) {
     248            $afterCode = '';
     249            if (is_admin()) {
     250                $afterCode = sprintf('
     251                    document.addEventListener("gform_field_added", function (event, form, field) {
     252                        if (field["type"] === "mosparo") {
     253                            initializeMosparo();
     254                        }
     255                    });
     256                   
     257                    if (typeof(gform) !== "undefined") {
     258                        gform.addAction("gform_after_refresh_field_preview", function (fieldId) {
     259                            let id = "mosparo-box-%s";
     260                            let eventFieldId = %d;
     261                           
     262                            if (fieldId !== eventFieldId) {
     263                                return;
     264                            }
     265                           
     266                            delete mosparoInstances[id];
     267                           
     268                            initializeMosparo();
     269                        });
     270                    }',
     271                    $instanceId,
     272                    $field->id
     273                );
     274            }
     275
    248276            return [
    249277                'before' => '
     
    258286                    };
    259287                    ',
    260                 'after' => sprintf('
    261                     document.addEventListener("gform_field_added", function (event, form, field) {
    262                         if (field["type"] === "mosparo") {
    263                             initializeMosparo();
    264                         }
    265                     });
    266                    
    267                     gform.addAction("gform_after_refresh_field_preview", function (fieldId) {
    268                         let id = "mosparo-box-%s";
    269                         let eventFieldId = %d;
    270                        
    271                         if (fieldId !== eventFieldId) {
    272                             return;
    273                         }
    274                        
    275                         delete mosparoInstances[id];
    276                        
    277                         initializeMosparo();
    278                     });', $instanceId, $field->id),
     288                'after' => $afterCode,
    279289            ];
    280290        }
Note: See TracChangeset for help on using the changeset viewer.