Plugin Directory

Changeset 1320072


Ignore:
Timestamp:
01/02/2016 10:41:47 PM (10 years ago)
Author:
fabbricaweb
Message:

Fixed bug with multiple forms on same page.

Location:
cf7-notie/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • cf7-notie/trunk/README.txt

    r1294188 r1320072  
    44Tags: contact form 7, wpcf7,contact form 7 addon, contact form, notie
    55Requires at least: 3.1.0
    6 Tested up to: 4.3
    7 Stable tag: 1.0
     6Tested up to: 4.4
     7Stable tag: 1.1
    88License: GPLv2
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    3838* 1.0
    3939First release.
     40
     41* 1.1
     42Fixed bug with multiple forms on same page.
  • cf7-notie/trunk/cf7_notie.php

    r1294178 r1320072  
    44 *
    55 * @link              http://www.fabbricaweb.com.br
    6  * @since             1.0
     6 * @since             1.1
    77 * @package           Cf7_notie
    88 *
     
    1010 * Plugin Name:       CF7 Notie
    1111 * Description:       Display Contact Form 7 response messages as an alternative the standard alert dialog.
    12  * Version:           1.0
     12 * Version:           1.1
    1313 * Author:            FabbricaWeb
    1414 * Author URI:        http://www.fabbricaweb.com.br
  • cf7-notie/trunk/public/class-cf7_notie-public.php

    r1294178 r1320072  
    55 *
    66 * @link       http://www.fabbricaweb.com.br
    7  * @since      1.0
     7 * @since      1.0.0
    88 *
    99 * @package    Cf7_notie
     
    2626     * The ID of this plugin.
    2727     *
    28      * @since    1.0
     28     * @since    1.0.0
    2929     * @access   private
    3030     * @var      string    $plugin_name    The ID of this plugin.
     
    3535     * The version of this plugin.
    3636     *
    37      * @since    1.0
     37     * @since    1.0.0
    3838     * @access   private
    3939     * @var      string    $version    The current version of this plugin.
     
    4444     * Initialize the class and set its properties.
    4545     *
    46      * @since    1.0
     46     * @since    1.0.0
    4747     * @param      string    $plugin_name       The name of the plugin.
    4848     * @param      string    $version    The version of this plugin.
     
    5858     * Register the stylesheets for the public-facing side of the site.
    5959     *
    60      * @since    1.0
     60     * @since    1.0.0
    6161     */
    6262    public function enqueue_styles() {
     
    8181     * Register the JavaScript for the public-facing side of the site.
    8282     *
    83      * @since    1.0
     83     * @since    1.0.0
    8484     */
    8585    public function enqueue_scripts() {
     
    112112        $return = '<script type="text/javascript">
    113113        jQuery(".wpcf7-submit").click(function() {
     114            var button = jQuery(this);
    114115            jQuery( document ).ajaxComplete(function() {
    115116                var notie_style = "";
    116                 if ( jQuery(".wpcf7-response-output").hasClass("wpcf7-validation-errors") ) {
     117                if ( button.parents(".wpcf7").find(".wpcf7-response-output").hasClass("wpcf7-validation-errors") ) {
    117118                    notie_style = 2;
    118                 } else if ( jQuery(".wpcf7-response-output").hasClass("wpcf7-mail-sent-ng") ) {
     119                } else if ( button.parents(".wpcf7").find(".wpcf7-response-output").hasClass("wpcf7-mail-sent-ng") ) {
    119120                    notie_style = 3;
    120121                } else {
    121122                    notie_style = 1;
    122123                }
    123                 notie.alert(notie_style, jQuery(".wpcf7-response-output").html(), 3);
     124                notie.alert(notie_style, button.parents(".wpcf7").find(".wpcf7-response-output").html(), 3);
    124125                jQuery(".wpcf7-response-output").css( "display", "none" );
    125126            });
Note: See TracChangeset for help on using the changeset viewer.