From 8ff09d851870d5b2854df12d445df85d8eb5e8b5 Mon Sep 17 00:00:00 2001 From: Chuck Scott Date: Thu, 26 May 2016 11:02:02 -0400 Subject: [PATCH] Fixed issue when adding contact and there's a submit failuer, removed add contact button when in "Contacts" menu --- models/admin/contacts/index.php | 5 +++-- views/admin/contacts/index.html | 7 ++++--- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/models/admin/contacts/index.php b/models/admin/contacts/index.php index 284d4fe..9234270 100644 --- a/models/admin/contacts/index.php +++ b/models/admin/contacts/index.php @@ -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': diff --git a/views/admin/contacts/index.html b/views/admin/contacts/index.html index 8f84fa8..52ad51a 100644 --- a/views/admin/contacts/index.html +++ b/views/admin/contacts/index.html @@ -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)} Add New {$terms.term_member_cap} Contact @@ -10,6 +7,10 @@
{/if} +{else} + {include file='admin/contacts/header.html'} +{/if} +
-- 2.17.1