Fixed missing add new member contact button
authorChuck Scott <cscott@gaslightmedia.com>
Mon, 16 May 2016 15:52:28 +0000 (11:52 -0400)
committerChuck Scott <cscott@gaslightmedia.com>
Mon, 16 May 2016 15:52:28 +0000 (11:52 -0400)
models/admin/contacts/index.php
views/admin/contacts/index.html

index 22fe460..284d4fe 100644 (file)
@@ -189,7 +189,7 @@ class GlmMembersAdmin_contacts_index extends GlmDataContacts
         switch($option) {
 
             case 'create':
-
+echo "HERER";
                 // Set reference type to Member
                 $refType = $this->config['ref_type_numb']['Member'];
                 $refTypeName = $this->config['ref_type'][$refType];
@@ -199,6 +199,9 @@ class GlmMembersAdmin_contacts_index extends GlmDataContacts
                 require_once(GLM_MEMBERS_CONTACTS_PLUGIN_LIB_PATH.'/EasyPassword/EasyPassword.php');
                 $EasyPassword = new EasyPassword();
                 $contactInfo['fieldData']['password'] = $EasyPassword->generateEasyPassword('firstlast');
+
+                $view = 'edit.html';
+
                 break;
 
             case 'addNew':
@@ -306,6 +309,8 @@ class GlmMembersAdmin_contacts_index extends GlmDataContacts
                     // Check for new cities being submitted
                     $this->checkNewCities($contactID);
 
+                    $view = 'edit.html';
+
                     break;
                 }
 
index 95af0cb..8f84fa8 100644 (file)
@@ -4,6 +4,12 @@
     {include file='admin/contacts/header.html'}
 {/if}
 
+    {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}
+
     <form action="{$thisUrl}?page={$thisPage}" method="post" id="searchForm">
         <input type="hidden" name="prevStart" value="{$prevStart}">
         <input type="hidden" name="nextStart" value="{$nextStart}">