Changing the redirect when going to another member.
authorSteve Sutton <steve@gaslightmedia.com>
Wed, 12 Sep 2018 17:12:58 +0000 (13:12 -0400)
committerSteve Sutton <steve@gaslightmedia.com>
Wed, 12 Sep 2018 17:12:58 +0000 (13:12 -0400)
Should be going to the dashboard. Was getting the member dashboard
widget repeated several times instead of what they should be getting.

index.php
views/admin/profile/contactMemberSelect.html

index 6edcbee..379e989 100644 (file)
--- a/index.php
+++ b/index.php
@@ -3,7 +3,7 @@
  * Plugin Name: GLM Members Database Contacts
  * Plugin URI: http://www.gaslightmedia.com/
  * Description: Gaslight Media Members Database.
- * Version: 1.1.10
+ * Version: 1.1.11
  * Author: Gaslight Media
  * Author URI: http://www.gaslightmedia.com/
  * License: GPL2
@@ -19,7 +19,7 @@
  * @package glmMembersDatabaseContacts
  * @author Gaslight Media <cscott@gaslightmedia.com>
  * @license http://www.gaslightmedia.com Gaslightmedia
- * @version 1.1.10
+ * @version 1.1.11
  */
 
 // Check that we're being called by WordPress.
@@ -39,7 +39,7 @@ if (!defined('ABSPATH')) {
  *  version when there's a change in the database!! Use the
  *  version nunmber of that release for the DB version.
  */
-define('GLM_MEMBERS_CONTACTS_PLUGIN_VERSION', '1.1.10');
+define('GLM_MEMBERS_CONTACTS_PLUGIN_VERSION', '1.1.11');
 define('GLM_MEMBERS_CONTACTS_PLUGIN_DB_VERSION', '0.0.3');
 
 // This is the minimum version of the GLM Members DB plugin require for this plugin.
index 4b70f91..c52b597 100644 (file)
@@ -4,8 +4,8 @@
     {if $contactMembers}
       {foreach $contactMembers as $m}
             <option value="{$m.id}" data-idCheck="{$m.idCheck}"{if isset($m.selected) && $m.selected} selected{/if}>
-                {$m.name} 
-            </div>                    
+                {$m.name}
+            </div>
       {/foreach}
     {/if}
 </select>
         $('#contactMembersSelection').on('change', function() {
             var toMember = $(this).val();
             var idCheck = $('#contactMembersSelection option:selected').attr('data-idCheck');
-            
+
             // Send AJAX action to update selected member
             $.ajax({
                url: "{$ajaxUrl}?action=glm_members_admin_ajax&glm_action=selectContactMember&member=" + toMember + "&idCheck=" + idCheck
             })
            .done(function() {
-               window.location.replace("{$thisUrl}?page={$thisPage}&glm_action=index&option=edit");
+               // Redirect the member to the dashboard
+               window.location.replace("{$thisUrl}?page=glm-members-admin-menu-member");
            });
 
         });