Fixed issue when adding contact and there's a submit failuer, removed add contact...
authorChuck Scott <cscott@gaslightmedia.com>
Thu, 26 May 2016 15:02:02 +0000 (11:02 -0400)
committerChuck Scott <cscott@gaslightmedia.com>
Thu, 26 May 2016 15:02:02 +0000 (11:02 -0400)
models/admin/contacts/index.php
views/admin/contacts/index.html

index 284d4fe..9234270 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];
@@ -319,8 +319,9 @@ echo "HERER";
                 $contactInfo['fieldData']['password'] = $_REQUEST['password'];
                 $refType = $_REQUEST['ref_type'];
                 $refTypeName = $this->config['ref_type'][$refType];
+                $view = 'edit.html';
 
-                // If addNew was unsuccessful, fall through to edit
+                // addNew was unsuccessful, fall through to edit
 
             case 'edit':
 
index 8f84fa8..52ad51a 100644 (file)
@@ -1,8 +1,5 @@
 {if $fromMemberMenu}
     {include file='admin/member/header.html'}
-{else}
-    {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>
@@ -10,6 +7,10 @@
        <br clear="all">
     {/if}
 
+{else}
+    {include file='admin/contacts/header.html'}
+{/if}
+
     <form action="{$thisUrl}?page={$thisPage}" method="post" id="searchForm">
         <input type="hidden" name="prevStart" value="{$prevStart}">
         <input type="hidden" name="nextStart" value="{$nextStart}">