From 19f791a529d648e8799b03e94be3cf27e5f68ab5 Mon Sep 17 00:00:00 2001 From: Mike Shantz Date: Tue, 4 Apr 2017 10:34:35 -0400 Subject: [PATCH] Only display team name if team status is approved. --- pcpteams.php | 1 + templates/CRM/Pcpteams/PCPInfo-team-name.tpl | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/pcpteams.php b/pcpteams.php index 09f8a54..11d901e 100644 --- a/pcpteams.php +++ b/pcpteams.php @@ -293,6 +293,7 @@ function pcpteams_civicrm_pageRun(&$page) { if ($pcp_team_info->civicrm_pcp_id_parent) { $smarty->assign('pcp_id_parent', $pcp_team_info->civicrm_pcp_id_parent); + $smarty->assign('pcp_team_status_id', $pcp_team_info->status_id); CRM_Core_Region::instance('pcp-page-pcpinfo')->add(array( 'template' => 'CRM/Pcpteams/PCPInfo-team-name.tpl', diff --git a/templates/CRM/Pcpteams/PCPInfo-team-name.tpl b/templates/CRM/Pcpteams/PCPInfo-team-name.tpl index cd2a7e2..819fa42 100644 --- a/templates/CRM/Pcpteams/PCPInfo-team-name.tpl +++ b/templates/CRM/Pcpteams/PCPInfo-team-name.tpl @@ -1,3 +1,3 @@ -{if $pcp_id_parent} +{if $pcp_id_parent && $pcp_team_status_id == 1}
{ts}Team:{/ts} {$pcp.pcp_id|pcpteams_getteamname}
{/if}