diff --git a/templates/CRM/Activity/Form/ActivityLinks.tpl b/templates/CRM/Activity/Form/ActivityLinks.tpl index 689b4e3cf1b2..3c9edf99cafe 100644 --- a/templates/CRM/Activity/Form/ActivityLinks.tpl +++ b/templates/CRM/Activity/Form/ActivityLinks.tpl @@ -9,7 +9,7 @@ *} {* Links for scheduling/logging meetings and calls and Sending Email *} -{if $contact_id } +{if !empty($contact_id) } {assign var = "contactId" value= $contact_id } {/if} diff --git a/templates/CRM/Contact/Page/Inline/Demographics.tpl b/templates/CRM/Contact/Page/Inline/Demographics.tpl index a0c2be1de5bd..e7e2ce5526b3 100644 --- a/templates/CRM/Contact/Page/Inline/Demographics.tpl +++ b/templates/CRM/Contact/Page/Inline/Demographics.tpl @@ -16,7 +16,7 @@ {/if}
{ts}Gender{/ts}
-
{$gender_display}
+
{if !empty($gender_display)}{$gender_display}{/if}
diff --git a/templates/CRM/Contact/Page/Inline/Email.tpl b/templates/CRM/Contact/Page/Inline/Email.tpl index ee977d431451..d8dcd36db04d 100644 --- a/templates/CRM/Contact/Page/Inline/Email.tpl +++ b/templates/CRM/Contact/Page/Inline/Email.tpl @@ -26,7 +26,7 @@ {/if} {foreach from=$email key="blockId" item=item} {if $item.email} -
+
{$item.location_type} {ts}Email{/ts} {privacyFlag field=do_not_email condition=$privacy.do_not_email}{privacyFlag field=on_hold condition=$item.on_hold} @@ -46,14 +46,14 @@ {$item.email} {/if} {if $item.on_hold == 2} ({ts}On Hold - Opt Out{/ts}) {ts}{$item.hold_date|truncate:10:''|crmDate}{/ts}{elseif $item.on_hold} ({ts}On Hold{/ts}) {ts}{$item.hold_date|truncate:10:''|crmDate}{/ts}{/if}{if $item.is_bulkmail} ({ts}Bulk{/ts}){/if} - {if $item.signature_text OR $item.signature_html} + {if !empty($item.signature_text) OR !empty($item.signature_html)} {ts}(signature){/ts} {/if}
- {ts}Signature HTML{/ts}
{$item.signature_html}

- {ts}Signature Text{/ts}
{$item.signature_text|nl2br}
+ {ts}Signature HTML{/ts}
{if !empty($item.signature_html)}{$item.signature_html}{/if}

+ {ts}Signature Text{/ts}
{if !empty($item.signature_text)}{$item.signature_text|nl2br}{/if}
{/if} diff --git a/templates/CRM/Custom/Form/Preview.tpl b/templates/CRM/Custom/Form/Preview.tpl index c246c00781b4..f4481271e845 100644 --- a/templates/CRM/Custom/Form/Preview.tpl +++ b/templates/CRM/Custom/Form/Preview.tpl @@ -26,18 +26,18 @@ {foreach from=$groupTree item=cd_edit key=group_id}

{if $preview_type eq 'group'}{$smarty.capture.legend}{/if} - {if $cd_edit.help_pre}
{$cd_edit.help_pre}

{/if} + {if !empty($cd_edit.help_pre)}
{$cd_edit.help_pre}

{/if} {foreach from=$cd_edit.fields item=element key=field_id} {if $element.is_view eq 0}{* fix for CRM-2699 *} - {if $element.help_pre} + {if !empty($element.help_pre)} {/if} - {if $element.options_per_line } + {if !empty($element.options_per_line)} {*assign var="element_name" value=$element.custom_group_id|cat:_|cat:$field_id|cat:_|cat:$element.name*} {assign var="element_name" value=$element.element_name} - + - +
{$element.help_pre}
{$form.$element_name.label}{if $element.help_post}{help id=$element.id file="CRM/Custom/Form/CustomField.hlp" title=$form.$element_name.label}{/if}{$form.$element_name.label}{if !empty($element.help_post)}{help id=$element.id file="CRM/Custom/Form/CustomField.hlp" title=$form.$element_name.label}{/if} {assign var="count" value="1"} @@ -62,11 +62,10 @@ {else} - {assign var="name" value=`$element.name`} - {*assign var="element_name" value=$group_id|cat:_|cat:$field_id|cat:_|cat:$element.name*} - {assign var="element_name" value=$element.element_name} + {capture assign="name"}{if !empty($element.name)}{$element.name}{/if}{/capture} + {capture assign="element_name"}{if !empty($element.element_name)}{$element.element_name}{/if}{/capture} - +
{$form.$element_name.label}{if $element.help_post}{help id=$element.id file="CRM/Custom/Form/CustomField.hlp" title=$form.$element_name.label}{/if}{$form.$element_name.label}{if !empty($element.help_post)}{help id=$element.id file="CRM/Custom/Form/CustomField.hlp" title=$form.$element_name.label}{/if} {$form.$element_name.html}  {if $element.html_type eq 'Autocomplete-Select'} @@ -79,7 +78,7 @@ {/if} {/foreach}
- {if $cd_edit.help_post}
{$cd_edit.help_post}
{/if} + {if !empty($cd_edit.help_post)}
{$cd_edit.help_post}
{/if} {/foreach} {/strip} diff --git a/templates/CRM/Custom/Page/Group.tpl b/templates/CRM/Custom/Page/Group.tpl index 2b2b7e6b5b2d..e88f69057565 100644 --- a/templates/CRM/Custom/Page/Group.tpl +++ b/templates/CRM/Custom/Page/Group.tpl @@ -45,7 +45,7 @@
{$row.title} {if $row.is_active eq 1} {ts}Yes{/ts} {else} {ts}No{/ts} {/if} {if $row.extends eq 'Contact'}{ts}All Contact Types{/ts}{else}{$row.extends_display}{/if}{$row.extends_entity_column_value}{if !empty($row.extends_entity_column_value)}{$row.extends_entity_column_value}{/if} {$row.weight} {$row.style_display} {$row.action|replace:'xx':$row.id}