From: Seamus Lee Date: Mon, 7 Jun 2021 22:21:45 +0000 (+0000) Subject: [php8-compact] Fix Dashboard Tests by adding in if guards into smarty templates X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=37f927e631aa0f1b02a67d8a15a70639b5c35f45;p=civicrm-core.git [php8-compact] Fix Dashboard Tests by adding in if guards into smarty templates --- diff --git a/templates/CRM/Case/Form/Search/Common.tpl b/templates/CRM/Case/Form/Search/Common.tpl index a6eb66cbc0..6b5edd73ce 100644 --- a/templates/CRM/Case/Form/Search/Common.tpl +++ b/templates/CRM/Case/Form/Search/Common.tpl @@ -48,7 +48,7 @@ {/if} - {if $form.case_tags.html} + {if !empty($form.case_tags.html)} {$form.case_tags.label}
{$form.case_tags.html} {/if} @@ -59,7 +59,7 @@ {include file="CRM/common/Tagset.tpl" tagsetType='case'} - {if $caseGroupTree} + {if !empty($caseGroupTree)} {include file="CRM/Custom/Form/Search.tpl" groupTree=$caseGroupTree showHideLinks=false} diff --git a/templates/CRM/Contact/Form/GroupContact.tpl b/templates/CRM/Contact/Form/GroupContact.tpl index 8997a1875b..39b9db30f4 100644 --- a/templates/CRM/Contact/Form/GroupContact.tpl +++ b/templates/CRM/Contact/Form/GroupContact.tpl @@ -10,6 +10,6 @@ {* this template is used for adding a contact to a group (from view context) *}
- {$form.group_id.html} {$form.buttons.html} + {if !empty($form.group_id)}{$form.group_id.html}{/if} {if !empty($form.buttons)}{$form.buttons.html}{/if} {include file="CRM/Form/validate.tpl"}
diff --git a/templates/CRM/Contact/Page/View/RelationshipSelector.tpl b/templates/CRM/Contact/Page/View/RelationshipSelector.tpl index 04d5b11e44..663b4aa7e0 100644 --- a/templates/CRM/Contact/Page/View/RelationshipSelector.tpl +++ b/templates/CRM/Contact/Page/View/RelationshipSelector.tpl @@ -10,6 +10,9 @@ {* entity selector *} {crmRegion name="crm-contact-relationshipselector-pre"} {/crmRegion} +{if !isset($entityInClassFormat)} + {assign var="entityInClassFormat" value="relationship"} +{/if}
{ts}In Support of{/ts} - {if !$userChecksum} {/if} + {if empty($userChecksum)} {/if} {foreach from=$pcpInfo item=row} @@ -30,7 +30,7 @@ - {if !$userChecksum} + {if empty($userChecksum)} {/if} diff --git a/templates/CRM/Core/DatePickerRangeWrapper.tpl b/templates/CRM/Core/DatePickerRangeWrapper.tpl index 2e6fcb54ad..f43499bd13 100644 --- a/templates/CRM/Core/DatePickerRangeWrapper.tpl +++ b/templates/CRM/Core/DatePickerRangeWrapper.tpl @@ -8,7 +8,7 @@ +--------------------------------------------------------------------+ *} {* Wrapper around DatePickerRange TPL file *} -
{ts}Campaign Ends{/ts} {ts}Status{/ts}
{$row.pageTitle} {if $row.end_date}{$row.end_date|truncate:10:''|crmDate}{else}({ts}ongoing{/ts}){/if} {$row.pcpStatus}{$row.action|replace:'xx':$row.pcpId}
+ {assign var='hideRelativeLabel' value=$hideRelativeLabel|default:0} {assign var='from' value=$from|default:'_low'} {assign var='to' value=$to|default:'_high'} diff --git a/templates/CRM/Form/validate.tpl b/templates/CRM/Form/validate.tpl index 6212a41bd8..9134e9f761 100644 --- a/templates/CRM/Form/validate.tpl +++ b/templates/CRM/Form/validate.tpl @@ -9,7 +9,7 @@ *} {* Initialize jQuery validate on a form *} {* Extra params and functions may be added to the CRM.validate object before this template is loaded *} -{if empty($crm_form_validate_included) and !empty($smarty.get.snippet) and $smarty.get.snippet neq 'json' and !empty($form) and !empty($form.formClass)} +{if empty($crm_form_validate_included) and isset($smarty.get.snippet) and $smarty.get.snippet neq 'json' and !empty($form) and !empty($form.formClass)} {assign var=crm_form_validate_included value=1} {literal}