Plugin Directory

Changeset 2267709


Ignore:
Timestamp:
03/25/2020 08:49:58 PM (6 years ago)
Author:
rxnlabs
Message:

Updated plugin version to 1.2.0

  • Increased PHP minimum version to 7.0
  • Fix old Group mappings code and re-enabled Group mappings so users can map Gravity Form submissions to Luminate groups
  • Added better logging for troubleshooting Luminate API calls that result in API errors
  • Fixed bug that could cause the Luminate surveys not to show up in the dropdown by reducing the number of surveys pulled from the API during each call
  • Removed the ConvioOpenAPI.php library and replaced it with a custom class that uses the WP_HTTP library to make calls to the Luminate API. This should help with cookie handling and troubleshooting HTTP issues by using the built-in WP_HTTP library
  • Added the ability for users to reveal their API passwords on the plugin settings page to make it easier to see the exact information being sent to the API
Location:
integration-for-luminate-and-gravity-forms
Files:
10 added
4 deleted
6 edited
1 copied

Legend:

Unmodified
Added
Removed
  • integration-for-luminate-and-gravity-forms/tags/1.2.0/assets/js/gravityforms-luminate.js

    r1996769 r2267709  
    150150
    151151            // since 2.8 ajaxurl is always defined in the admin header and points to admin-ajax.php
    152             $('#gaddon-setting-row-surveyMappedFields > td').prepend('<div class="loader-inner ball-pulse"></div>').find('.settings-field-map-table').hide();
    153             $('.loader-inner').loaders();
     152            // Set a timeout on adding loaders to table. Wait till everything is loaded since this was broken
     153            // before the release of version 1.2.0
     154            setTimeout( function() {
     155                $('#gaddon-setting-row-surveyMappedFields > td').prepend('<div class="loader-inner ball-pulse"></div>').find('.settings-field-map-table').hide();
     156                $('.loader-inner').loaders();
     157            }, 200 );
    154158
    155159            $.ajax({
     
    201205         */
    202206        function removeUnselectedGroupsFromProcessing() {
    203             $('#gform-settings').on('submit', function(){
    204                 var checkboxes = $('#gaddon-setting-row-groups input');
    205 
    206                 $.map(checkboxes, function(node,index){
    207                     var $node = $(node);
    208 
    209                     if ( $node.prop('type').toLowerCase() == 'checkbox' && $node.prop('checked') == false) {
    210                         $node.prop('disabled', true);
    211                     } else if ( $node.val() == '0' ) {
    212                         $node.prop('disabled', true);
    213                     }
    214                 });
    215             })
     207            var $feed_form = $( '#form_settings #gform-settings' ).addClass( 'not-ready' ),
     208                $feed_form_submit = $feed_form.find( 'input[type="submit"]' );
     209            $feed_form_submit.on( 'click submit', function( e ) {
     210                if ( $feed_form.hasClass( 'not-ready' ) ) {
     211                    e.preventDefault();
     212                    $feed_form.removeClass( 'not-ready' );
     213                    var checkboxes = $('#gaddon-setting-row-groups input');
     214
     215                    $.map( checkboxes, function( node, index ) {
     216                        var $node = $( node );
     217
     218                        if ( $node.prop( 'type' ).toLowerCase() == 'checkbox' && $node.prop( 'checked' ) == false) {
     219                            $node.prop( 'disabled', true );
     220                            $node.prev().prop( 'disabled', true );
     221                        }
     222                    } );
     223
     224                    console.log($feed_form.find( 'input[type="submit"]' ));
     225                    $feed_form_submit.click();
     226                    return true;
     227                }
     228
     229                return true;
     230
     231            } );
    216232        }
    217233
    218234        removeUnselectedGroupsFromProcessing();
     235
     236        /**
     237         * Add the ability for users to reveal the password field for the Luminate fields
     238         */
     239        function reveal_password() {
     240            $( 'input[type="password"]' ).hideShowPassword(true, true);
     241        }
     242        reveal_password();
    219243
    220244    });
  • integration-for-luminate-and-gravity-forms/tags/1.2.0/gravityforms-luminate.php

    r2201760 r2267709  
    44Plugin URI: https://cornershopcreative.com/product/gravity-forms-add-ons/
    55Description: Integrates Gravity Forms with Luminate CRM, allowing form submissions to automatically create/update Constituents, map submissions to surveys (targets Convio Constituents Only and surveys, NOT Alerts)
    6 Version: 1.1.10
     6Version: 1.2.0
    77Author: Cornershop Creative
    88Author URI: https://cornershopcreative.com
    99Text Domain: gfluminate
    1010*/
     11
     12if ( ! function_exists( 'get_plugin_data' ) ) {
     13    require_once( ABSPATH . 'wp-admin/includes/plugin.php' );
     14}
     15
     16$gravity_forms_luminate = get_plugin_data( __FILE__, true );
     17define( 'GF_LUMINATE_VERSION', $gravity_forms_luminate['Version'] );
     18// remove from global so we don't pollute global
     19unset( $gravity_forms_luminate );
    1120
    1221add_action( 'gform_loaded', array( 'GF_Luminate_Bootstrap', 'load' ), 5 );
     
    2332        }
    2433
    25         if ( !class_exists('ConvioOpenAPI') ) {
    26             require_once( 'ConvioOpenAPI.php' );
     34        if ( ! class_exists( '\WP_HTTP_Luminate' ) ) {
     35            require_once( __DIR__  . '/inc/class-wp-http-luminate.php' );
    2736        }
    2837
    29         require_once( 'class-gf-luminate.php' );
     38        require_once( __DIR__  . '/inc/class-gf-luminate.php' );
    3039
    3140        GFAddOn::register( 'GFLuminate' );
     
    4958    $input_mask = '*';
    5059    $fifty_five_more_characters = '';
    51     for( $i=0; $i < 55; $i++ ) {
     60    for ( $i = 0; $i < 55; $i++ ) {
    5261        $fifty_five_more_characters .= $input_mask;
    5362    }
    54     $masks['Luminate Username'] = '*?'.$fifty_five_more_characters;
     63    $masks['Luminate Username'] = '*?' . $fifty_five_more_characters;
    5564
    5665    return $masks;
  • integration-for-luminate-and-gravity-forms/tags/1.2.0/readme.txt

    r2205915 r2267709  
    33Tags: forms, crm, integration
    44Requires at least: 3.6
    5 Tested up to: 5.3
     5Requires PHP: 7.0
     6Tested up to: 5.3.2
    67Stable tag: trunk
    78License: GPLv2 or later
     
    4546= What kinds of data can this pass to Luminate? =
    4647
    47 Right now, this Add-On supports pushing Gravity Forms responses into Constituent records, and/or into Survey responses. It does not support advocacy forms or donation forms. It can pass data into any built-in Constituent field in Luminate, as well as map Constituent profile data in response to published Surveys.
     48Right now, this Add-On supports pushing Gravity Forms responses into Constituent records, into Survey responses and/or adding users to Luminate Groups. It does not support advocacy forms or donation forms. It can pass data into any built-in Constituent field in Luminate, as well as map Constituent profile data in response to published Surveys.
    4849
    4950= My survey data isn't making it into Luminate how I expected. Is this plugin broken? =
     
    5960Yes, this plugin will work with custom Luminate domains. If your secure site is not https://secure.convio.net or https://secure2.convio.net and is instead something like https://secure.my-domain-here.org, this plugin should work for you. On the plugin settings page, use your custom secure domain when entering in the Luminate servlet.
    6061
     62= My form submissions are not showing up in Luminate, why is this happening? =
     63
     64Enable Gravity Forms logging and you will see a log file being generated for this plugin. The log file should contain information about why your submissions are not appearing in Luminate. If you are unable to resolve the issues in the log file, please contact Cornershop Creative support or add a ticket to the plugin support forum.
     65
    6166== Changelog ==
     67
     68= 1.2.0 =
     69* Increased minimum PHP version to 7.0.
     70* Added Group mappings. Map form submissions to Luminate groups.
     71* Add better logging to troubleshoot Luminate API errors.
     72* Add hide-show-password functionality on the plugin settings page to show the Luminate API password
     73* Fixed bug that could cause surveys not to display in the dropdown when attempting survey mappings.
     74* Removed ConvioOpenAPI.php library and replaced it with a library that leverages the WP_HTTP library.
    6275
    6376= 1.1.10 =
  • integration-for-luminate-and-gravity-forms/trunk/assets/js/gravityforms-luminate.js

    r1996769 r2267709  
    150150
    151151            // since 2.8 ajaxurl is always defined in the admin header and points to admin-ajax.php
    152             $('#gaddon-setting-row-surveyMappedFields > td').prepend('<div class="loader-inner ball-pulse"></div>').find('.settings-field-map-table').hide();
    153             $('.loader-inner').loaders();
     152            // Set a timeout on adding loaders to table. Wait till everything is loaded since this was broken
     153            // before the release of version 1.2.0
     154            setTimeout( function() {
     155                $('#gaddon-setting-row-surveyMappedFields > td').prepend('<div class="loader-inner ball-pulse"></div>').find('.settings-field-map-table').hide();
     156                $('.loader-inner').loaders();
     157            }, 200 );
    154158
    155159            $.ajax({
     
    201205         */
    202206        function removeUnselectedGroupsFromProcessing() {
    203             $('#gform-settings').on('submit', function(){
    204                 var checkboxes = $('#gaddon-setting-row-groups input');
    205 
    206                 $.map(checkboxes, function(node,index){
    207                     var $node = $(node);
    208 
    209                     if ( $node.prop('type').toLowerCase() == 'checkbox' && $node.prop('checked') == false) {
    210                         $node.prop('disabled', true);
    211                     } else if ( $node.val() == '0' ) {
    212                         $node.prop('disabled', true);
    213                     }
    214                 });
    215             })
     207            var $feed_form = $( '#form_settings #gform-settings' ).addClass( 'not-ready' ),
     208                $feed_form_submit = $feed_form.find( 'input[type="submit"]' );
     209            $feed_form_submit.on( 'click submit', function( e ) {
     210                if ( $feed_form.hasClass( 'not-ready' ) ) {
     211                    e.preventDefault();
     212                    $feed_form.removeClass( 'not-ready' );
     213                    var checkboxes = $('#gaddon-setting-row-groups input');
     214
     215                    $.map( checkboxes, function( node, index ) {
     216                        var $node = $( node );
     217
     218                        if ( $node.prop( 'type' ).toLowerCase() == 'checkbox' && $node.prop( 'checked' ) == false) {
     219                            $node.prop( 'disabled', true );
     220                            $node.prev().prop( 'disabled', true );
     221                        }
     222                    } );
     223
     224                    console.log($feed_form.find( 'input[type="submit"]' ));
     225                    $feed_form_submit.click();
     226                    return true;
     227                }
     228
     229                return true;
     230
     231            } );
    216232        }
    217233
    218234        removeUnselectedGroupsFromProcessing();
     235
     236        /**
     237         * Add the ability for users to reveal the password field for the Luminate fields
     238         */
     239        function reveal_password() {
     240            $( 'input[type="password"]' ).hideShowPassword(true, true);
     241        }
     242        reveal_password();
    219243
    220244    });
  • integration-for-luminate-and-gravity-forms/trunk/gravityforms-luminate.php

    r2201760 r2267709  
    44Plugin URI: https://cornershopcreative.com/product/gravity-forms-add-ons/
    55Description: Integrates Gravity Forms with Luminate CRM, allowing form submissions to automatically create/update Constituents, map submissions to surveys (targets Convio Constituents Only and surveys, NOT Alerts)
    6 Version: 1.1.10
     6Version: 1.2.0
    77Author: Cornershop Creative
    88Author URI: https://cornershopcreative.com
    99Text Domain: gfluminate
    1010*/
     11
     12if ( ! function_exists( 'get_plugin_data' ) ) {
     13    require_once( ABSPATH . 'wp-admin/includes/plugin.php' );
     14}
     15
     16$gravity_forms_luminate = get_plugin_data( __FILE__, true );
     17define( 'GF_LUMINATE_VERSION', $gravity_forms_luminate['Version'] );
     18// remove from global so we don't pollute global
     19unset( $gravity_forms_luminate );
    1120
    1221add_action( 'gform_loaded', array( 'GF_Luminate_Bootstrap', 'load' ), 5 );
     
    2332        }
    2433
    25         if ( !class_exists('ConvioOpenAPI') ) {
    26             require_once( 'ConvioOpenAPI.php' );
     34        if ( ! class_exists( '\WP_HTTP_Luminate' ) ) {
     35            require_once( __DIR__  . '/inc/class-wp-http-luminate.php' );
    2736        }
    2837
    29         require_once( 'class-gf-luminate.php' );
     38        require_once( __DIR__  . '/inc/class-gf-luminate.php' );
    3039
    3140        GFAddOn::register( 'GFLuminate' );
     
    4958    $input_mask = '*';
    5059    $fifty_five_more_characters = '';
    51     for( $i=0; $i < 55; $i++ ) {
     60    for ( $i = 0; $i < 55; $i++ ) {
    5261        $fifty_five_more_characters .= $input_mask;
    5362    }
    54     $masks['Luminate Username'] = '*?'.$fifty_five_more_characters;
     63    $masks['Luminate Username'] = '*?' . $fifty_five_more_characters;
    5564
    5665    return $masks;
  • integration-for-luminate-and-gravity-forms/trunk/readme.txt

    r2205915 r2267709  
    33Tags: forms, crm, integration
    44Requires at least: 3.6
    5 Tested up to: 5.3
     5Requires PHP: 7.0
     6Tested up to: 5.3.2
    67Stable tag: trunk
    78License: GPLv2 or later
     
    4546= What kinds of data can this pass to Luminate? =
    4647
    47 Right now, this Add-On supports pushing Gravity Forms responses into Constituent records, and/or into Survey responses. It does not support advocacy forms or donation forms. It can pass data into any built-in Constituent field in Luminate, as well as map Constituent profile data in response to published Surveys.
     48Right now, this Add-On supports pushing Gravity Forms responses into Constituent records, into Survey responses and/or adding users to Luminate Groups. It does not support advocacy forms or donation forms. It can pass data into any built-in Constituent field in Luminate, as well as map Constituent profile data in response to published Surveys.
    4849
    4950= My survey data isn't making it into Luminate how I expected. Is this plugin broken? =
     
    5960Yes, this plugin will work with custom Luminate domains. If your secure site is not https://secure.convio.net or https://secure2.convio.net and is instead something like https://secure.my-domain-here.org, this plugin should work for you. On the plugin settings page, use your custom secure domain when entering in the Luminate servlet.
    6061
     62= My form submissions are not showing up in Luminate, why is this happening? =
     63
     64Enable Gravity Forms logging and you will see a log file being generated for this plugin. The log file should contain information about why your submissions are not appearing in Luminate. If you are unable to resolve the issues in the log file, please contact Cornershop Creative support or add a ticket to the plugin support forum.
     65
    6166== Changelog ==
     67
     68= 1.2.0 =
     69* Increased minimum PHP version to 7.0.
     70* Added Group mappings. Map form submissions to Luminate groups.
     71* Add better logging to troubleshoot Luminate API errors.
     72* Add hide-show-password functionality on the plugin settings page to show the Luminate API password
     73* Fixed bug that could cause surveys not to display in the dropdown when attempting survey mappings.
     74* Removed ConvioOpenAPI.php library and replaced it with a library that leverages the WP_HTTP library.
    6275
    6376= 1.1.10 =
Note: See TracChangeset for help on using the changeset viewer.