Update link for deleting packages
authorSteve Sutton <steve@gaslightmedia.com>
Thu, 21 Mar 2019 17:04:08 +0000 (13:04 -0400)
committerSteve Sutton <steve@gaslightmedia.com>
Thu, 21 Mar 2019 17:04:08 +0000 (13:04 -0400)
When locked to member the glm_action needs to be index.

index.php
views/admin/packaging/index.html

index 7c35621..86c4c9d 100644 (file)
--- a/index.php
+++ b/index.php
@@ -3,7 +3,7 @@
  * Plugin Name: GLM Assoicate - Packaging Add-On
  * Plugin URI: http://www.gaslightmedia.com/
  * Description: Gaslight Media Members Database.
- * Version: 1.3.0
+ * Version: 1.3.1
  * Author: Gaslight Media
  * Author URI: http://www.gaslightmedia.com/
  * License: GPL2
@@ -19,7 +19,7 @@
  * @package glmMembersDatabasePackagingAddOn
  * @author Chuck Scott <cscott@gaslightmedia.com>
  * @license http://www.gaslightmedia.com Gaslightmedia
- * @version 1.3.0
+ * @version 1.3.1
  */
 
 // Check that we're being called by WordPress.
@@ -43,7 +43,7 @@ if (!defined('ABSPATH')) {
  *  so that we're sure the other add-ons see an up to date
  *  version from this plugin.
  */
-define('GLM_MEMBERS_PACKAGING_PLUGIN_VERSION', '1.3.0');
+define('GLM_MEMBERS_PACKAGING_PLUGIN_VERSION', '1.3.1');
 define('GLM_MEMBERS_PACKAGING_PLUGIN_DB_VERSION', '1.1.8');
 
 // This is the minimum version of the GLM Members DB plugin require for this plugin.
index 94e6384..eaa2a73 100644 (file)
                 $("#deletePackageDialog").dialog("close");
             });
             $('#deletePackageSubmit').click( function() {
-                window.location.replace("{$thisUrl}?page={$thisPage}&glm_action=packaging&option=delete&packageID={$packageInfo.fieldData.id}");
+                {if $lockedToMember}
+                    window.location.replace("{$thisUrl}?page={$thisPage}&glm_action=index&option=delete&packageID={$packageInfo.fieldData.id}");
+                {else}
+                    window.location.replace("{$thisUrl}?page={$thisPage}&glm_action=packaging&option=delete&packageID={$packageInfo.fieldData.id}");
+                {/if}
             });
     {/if}