Plugin Directory

Changeset 3354169


Ignore:
Timestamp:
09/01/2025 05:39:02 PM (7 months ago)
Author:
mosparo
Message:

Contact Form 7: Fixed incorrect event handling, particularly in invisible mode.

Location:
mosparo-integration
Files:
3 edited
66 copied

Legend:

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

    r3353016 r3354169  
    1515 * Author URI:        https://mosparo.io/
    1616 * License:           MIT
    17  * Version:           1.15.0
     17 * Version:           1.15.1
    1818 * Text Domain:       mosparo-integration
    1919 * Domain Path:       /languages
  • mosparo-integration/tags/1.15.1/readme.txt

    r3353016 r3354169  
    55Tested up to: 6.8.1
    66Requires PHP: 7.4
    7 Stable tag: 1.15.0
     7Stable tag: 1.15.1
    88License: MIT
    99
     
    105105== Changelog ==
    106106
     107= 1.15.1 =
     108*Release Date: 1st September 2025*
     109
     110* [Bugfix] Contact Form 7: Fixed incorrect event handling, particularly in invisible mode.
     111
    107112= 1.15.0 =
    108113*Release Date: 30th August 2025*
  • mosparo-integration/tags/1.15.1/src/MosparoIntegration/Helper/FrontendHelper.php

    r3353016 r3354169  
    224224                'before' => '
    225225                    if (typeof wpcf7 !== "undefined" && mosparoFieldEl.closest(".wpcf7")) {
     226                        wpcf7.blocked = true;
     227                       
     228                        options.onCheckForm = function (result) {
     229                            if (result) {
     230                                wpcf7.blocked = false;
     231                            }
     232                        };
     233                       
    226234                        if (typeof wpcf7.cached !== "undefined" && wpcf7.cached) {
    227235                            options.requestSubmitTokenOnInit = false;
    228236                        }
    229237                       
    230                         mosparoFieldEl.closest(".wpcf7").addEventListener("wpcf7spam", resetMosparoField);
     238                        mosparoFieldEl.closest(".wpcf7").addEventListener("wpcf7invalid", function () {
     239                            wpcf7.blocked = true;
     240                            resetMosparoField();
     241                        });
     242                       
     243                        mosparoFieldEl.closest(".wpcf7").addEventListener("wpcf7spam", function () {
     244                            wpcf7.blocked = true;
     245                            resetMosparoField();
     246                        });
    231247                    }
    232248                ',
  • mosparo-integration/trunk/mosparo-integration.php

    r3353016 r3354169  
    1515 * Author URI:        https://mosparo.io/
    1616 * License:           MIT
    17  * Version:           1.15.0
     17 * Version:           1.15.1
    1818 * Text Domain:       mosparo-integration
    1919 * Domain Path:       /languages
  • mosparo-integration/trunk/readme.txt

    r3353016 r3354169  
    55Tested up to: 6.8.1
    66Requires PHP: 7.4
    7 Stable tag: 1.15.0
     7Stable tag: 1.15.1
    88License: MIT
    99
     
    105105== Changelog ==
    106106
     107= 1.15.1 =
     108*Release Date: 1st September 2025*
     109
     110* [Bugfix] Contact Form 7: Fixed incorrect event handling, particularly in invisible mode.
     111
    107112= 1.15.0 =
    108113*Release Date: 30th August 2025*
  • mosparo-integration/trunk/src/MosparoIntegration/Helper/FrontendHelper.php

    r3353016 r3354169  
    224224                'before' => '
    225225                    if (typeof wpcf7 !== "undefined" && mosparoFieldEl.closest(".wpcf7")) {
     226                        wpcf7.blocked = true;
     227                       
     228                        options.onCheckForm = function (result) {
     229                            if (result) {
     230                                wpcf7.blocked = false;
     231                            }
     232                        };
     233                       
    226234                        if (typeof wpcf7.cached !== "undefined" && wpcf7.cached) {
    227235                            options.requestSubmitTokenOnInit = false;
    228236                        }
    229237                       
    230                         mosparoFieldEl.closest(".wpcf7").addEventListener("wpcf7spam", resetMosparoField);
     238                        mosparoFieldEl.closest(".wpcf7").addEventListener("wpcf7invalid", function () {
     239                            wpcf7.blocked = true;
     240                            resetMosparoField();
     241                        });
     242                       
     243                        mosparoFieldEl.closest(".wpcf7").addEventListener("wpcf7spam", function () {
     244                            wpcf7.blocked = true;
     245                            resetMosparoField();
     246                        });
    231247                    }
    232248                ',
Note: See TracChangeset for help on using the changeset viewer.