From 458ce73200d35cce69c18e3ce09cd0ea02a30dfe Mon Sep 17 00:00:00 2001 From: Eileen McNaughton Date: Mon, 22 Aug 2022 09:50:58 +1200 Subject: [PATCH] Strict smarty notice fix on contact edit - isSingleRecordEdit --- templates/CRM/Contact/Form/Contact.tpl | 2 +- templates/CRM/Custom/Form/Edit/CustomData.tpl | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/templates/CRM/Contact/Form/Contact.tpl b/templates/CRM/Contact/Form/Contact.tpl index fe56d71bb9..962359cfab 100644 --- a/templates/CRM/Contact/Form/Contact.tpl +++ b/templates/CRM/Contact/Form/Contact.tpl @@ -78,7 +78,7 @@ {foreach from = $editOptions item = "title" key="name"} {if $name eq 'CustomData' } -
{include file="CRM/Contact/Form/Edit/CustomData.tpl"}
+
{include file="CRM/Contact/Form/Edit/CustomData.tpl" isSingleRecordEdit=false}
{else} {include file="CRM/Contact/Form/Edit/$name.tpl"} {/if} diff --git a/templates/CRM/Custom/Form/Edit/CustomData.tpl b/templates/CRM/Custom/Form/Edit/CustomData.tpl index c73d98453e..8228791b3c 100644 --- a/templates/CRM/Custom/Form/Edit/CustomData.tpl +++ b/templates/CRM/Custom/Form/Edit/CustomData.tpl @@ -1,4 +1,4 @@ -{if empty($isSingleRecordEdit) && $cd_edit.is_multiple eq 1 and $cd_edit.table_id and $contactId and !$skipTitle and $cd_edit.style eq 'Inline'} +{if !$isSingleRecordEdit && $cd_edit.is_multiple eq 1 and $cd_edit.table_id and $contactId and !$skipTitle and $cd_edit.style eq 'Inline'} {assign var=tableID value=$cd_edit.table_id} @@ -9,7 +9,7 @@ {if $cd_edit.help_pre}
{$cd_edit.help_pre}
{/if} - +
{foreach from=$cd_edit.fields item=element key=field_id} {if $customDataEntity && $blockId} {* custom data entity combined with blockId tells us we have an entity with mutliple blocks @@ -25,7 +25,7 @@
{if $cd_edit.help_post}
{$cd_edit.help_post}
{/if} -{if empty($isSingleRecordEdit) && $cd_edit.is_multiple and ( ( $cd_edit.max_multiple eq '' ) or ( $cd_edit.max_multiple > 0 and $cd_edit.max_multiple > $cgCount ) ) } +{if !$isSingleRecordEdit && $cd_edit.is_multiple and ( ( $cd_edit.max_multiple eq '' ) or ( $cd_edit.max_multiple > 0 and $cd_edit.max_multiple > $cgCount ) ) } {if $skipTitle} {* We don't yet support adding new records in inline-edit forms *}
-- 2.25.1