Fixed problems with logged in member users not being able to create and delete contacts
authorChuck Scott <cscott@gaslightmedia.com>
Thu, 2 Jun 2016 17:36:33 +0000 (13:36 -0400)
committerChuck Scott <cscott@gaslightmedia.com>
Thu, 2 Jun 2016 17:36:33 +0000 (13:36 -0400)
views/admin/contacts/edit.html
views/admin/contacts/index.html

index dca4984..cd2e216 100644 (file)
                 $("#deleteContactDialog").dialog("close");
             });            
             $('#deleteContactSubmit').click( function() {
+{if $fromMemberMenu}
                 window.location.replace("{$thisUrl}?page={$thisPage}&glm_action=contacts&member={$memberID}&option=delete&contact={$contactID}");
+{else}
+                window.location.replace("{$thisUrl}?page=glm-members-admin-menu-contacts&glm_action=index&option=delete&contact={$contactID}");
+{/if}
             });
 
             // Set masking for phone number fields - see http://digitalbush.com/projects/masked-input-plugin/
index 52ad51a..2094455 100644 (file)
@@ -1,16 +1,20 @@
 {if $fromMemberMenu}
     {include file='admin/member/header.html'}
 
-    {if apply_filters('glm_members_permit_admin_member_contacts_add_contact', true)}
-       <a href="{$thisUrl}?page={$thisPage}&glm_action=contacts&member={$memberID}&option=create" class="button button-primary glm-button glm-right">Add New {$terms.term_member_cap} Contact</a>
-       <br>
-       <br clear="all">
-    {/if}
-
 {else}
     {include file='admin/contacts/header.html'}
 {/if}
 
+{if apply_filters('glm_members_permit_admin_member_contacts_add_contact', true)}
+    {if $fromMemberMenu}
+        <a href="{$thisUrl}?page={$thisPage}&glm_action=contacts&member={$memberID}&option=create" class="button button-primary glm-button glm-right">Add New {$terms.term_member_cap} Contact</a>
+    {else}
+        <a href="{$thisUrl}?page=glm-members-admin-menu-contacts&glm_action=index&option=create" class="button button-primary glm-button glm-right">Add New {$terms.term_member_cap} Contact</a>
+    {/if}
+       <br>
+       <br clear="all">
+{/if}
+
     <form action="{$thisUrl}?page={$thisPage}" method="post" id="searchForm">
         <input type="hidden" name="prevStart" value="{$prevStart}">
         <input type="hidden" name="nextStart" value="{$nextStart}">
@@ -22,7 +26,6 @@
             <span class="glm-nowrap">
                 <b>Text Search: </b><input  id="glmContactsSearch" name="filterText" type="text" id="autoTest" value="{$filterText}">
                 <input type="submit" value="Submit">
-            </span>
         </div>
         
         <h2 class="glm-left">Contacts</h2>