From b0d8f42f15bf20bd7334653c7b26fd795eed0148 Mon Sep 17 00:00:00 2001 From: Eileen McNaughton Date: Fri, 26 Nov 2021 14:40:03 +1300 Subject: [PATCH] Template notice cleanup - make sane The CRM/Custom/Form/CustomData.tpl is called with formEdit set from 1 place - CRM/Contact/Form/Edit/CustomData.tpl - when this is the case only 1 line of code is shared with the code path if formEdit is not true/ passed in. This is silly & can be avoided --- templates/CRM/Contact/Form/Edit/CustomData.tpl | 3 ++- templates/CRM/Custom/Form/CustomData.tpl | 7 +------ 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/templates/CRM/Contact/Form/Edit/CustomData.tpl b/templates/CRM/Contact/Form/Edit/CustomData.tpl index 7c8beed8eb..98c49144d4 100644 --- a/templates/CRM/Contact/Form/Edit/CustomData.tpl +++ b/templates/CRM/Contact/Form/Edit/CustomData.tpl @@ -23,7 +23,8 @@ {$cd_edit.title}
- {include file="CRM/Custom/Form/CustomData.tpl" formEdit=true} + {include file="CRM/Custom/Form/Edit/CustomData.tpl" customDataEntity=''} + {include file="CRM/Form/attachmentjs.tpl"}
diff --git a/templates/CRM/Custom/Form/CustomData.tpl b/templates/CRM/Custom/Form/CustomData.tpl index 1464225f44..47fa94236e 100644 --- a/templates/CRM/Custom/Form/CustomData.tpl +++ b/templates/CRM/Custom/Form/CustomData.tpl @@ -8,10 +8,7 @@ +--------------------------------------------------------------------+ *} {* Custom Data form*} -{if !empty($formEdit)} - {include file="CRM/Custom/Form/Edit/CustomData.tpl" customDataEntity=''} -{else} - {foreach from=$groupTree item=cd_edit key=group_id name=custom_sets} +{foreach from=$groupTree item=cd_edit key=group_id name=custom_sets} {if $cd_edit.is_multiple and $multiRecordDisplay eq 'single'} {assign var="isSingleRecordEdit" value=TRUE} {else} @@ -41,6 +38,4 @@ {/if} {/foreach} -{/if} - {include file="CRM/Form/attachmentjs.tpl"} -- 2.25.1