From 7f371aa963ac739ff29dbbd17d45d0e7e74661fc Mon Sep 17 00:00:00 2001 From: Coleman Watts Date: Fri, 18 Jun 2021 17:31:21 -0400 Subject: [PATCH] Fix undefined tpl variables on contact summary --- templates/CRM/Contact/Page/Inline/Basic.tpl | 2 ++ .../Contact/Page/Inline/CommunicationPreferences.tpl | 2 +- templates/CRM/Contact/Page/Inline/ContactInfo.tpl | 10 +++++----- templates/CRM/Contact/Page/Inline/Website.tpl | 3 ++- templates/CRM/Contact/Page/View/Summary.tpl | 8 ++++---- 5 files changed, 14 insertions(+), 11 deletions(-) diff --git a/templates/CRM/Contact/Page/Inline/Basic.tpl b/templates/CRM/Contact/Page/Inline/Basic.tpl index cc9d6cfd8a..3b0bca9ee8 100644 --- a/templates/CRM/Contact/Page/Inline/Basic.tpl +++ b/templates/CRM/Contact/Page/Inline/Basic.tpl @@ -5,11 +5,13 @@ title="{ts}Edit Tags{/ts}">{ts}Tags{/ts}
+ {if !empty($contactTag)} {foreach from=$contactTag item=tagName key=tagId} {$tagName} {/foreach} + {/if}
diff --git a/templates/CRM/Contact/Page/Inline/CommunicationPreferences.tpl b/templates/CRM/Contact/Page/Inline/CommunicationPreferences.tpl index 1093e03c92..22fa7db810 100644 --- a/templates/CRM/Contact/Page/Inline/CommunicationPreferences.tpl +++ b/templates/CRM/Contact/Page/Inline/CommunicationPreferences.tpl @@ -30,7 +30,7 @@ {$preferred_communication_method_display}
- {if $preferred_language} + {if !empty($preferred_language)}
{ts}Preferred Language{/ts}
diff --git a/templates/CRM/Contact/Page/Inline/ContactInfo.tpl b/templates/CRM/Contact/Page/Inline/ContactInfo.tpl index e6f23db339..92ca7fe9fe 100644 --- a/templates/CRM/Contact/Page/Inline/ContactInfo.tpl +++ b/templates/CRM/Contact/Page/Inline/ContactInfo.tpl @@ -27,27 +27,27 @@
{ts}Job Title{/ts}
-
{$job_title}
+
{if isset($job_title)}{$job_title}{/if}
{/if}
{ts}Nickname{/ts}
-
{$nick_name}
+
{if isset($nick_name)}{$nick_name}{/if}
{if $contact_type eq 'Organization'}
{ts}Legal Name{/ts}
- +
{ts}SIC Code{/ts}
-
{$sic_code}
+
{if isset($sic_code)}{$sic_code}{/if}
{/if}
{ts}Source{/ts}
-
{$source}
+
{if isset($source)}{$source}{/if}
diff --git a/templates/CRM/Contact/Page/Inline/Website.tpl b/templates/CRM/Contact/Page/Inline/Website.tpl index d509655b4d..27bde2283a 100644 --- a/templates/CRM/Contact/Page/Inline/Website.tpl +++ b/templates/CRM/Contact/Page/Inline/Website.tpl @@ -20,7 +20,7 @@
{ts}Website{/ts}
- {/if} + {else} {foreach from=$website item=item} {if !empty($item.url)}
@@ -29,5 +29,6 @@
{/if} {/foreach} + {/if} diff --git a/templates/CRM/Contact/Page/View/Summary.tpl b/templates/CRM/Contact/Page/View/Summary.tpl index c9af2ebe84..8eb9fa7130 100644 --- a/templates/CRM/Contact/Page/View/Summary.tpl +++ b/templates/CRM/Contact/Page/View/Summary.tpl @@ -23,10 +23,10 @@