Skip to content

Commit

Permalink
Merge pull request civicrm#24330 from eileenmcnaughton/smarty_notice_…
Browse files Browse the repository at this point in the history
…single_record_edit

Strict smarty notice fix on contact edit - `isSingleRecordEdit`
  • Loading branch information
seamuslee001 authored Aug 22, 2022
2 parents 9b9c0c4 + 458ce73 commit 71f0493
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion templates/CRM/Contact/Form/Contact.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@

{foreach from = $editOptions item = "title" key="name"}
{if $name eq 'CustomData' }
<div id='customData'>{include file="CRM/Contact/Form/Edit/CustomData.tpl"}</div>
<div id='customData'>{include file="CRM/Contact/Form/Edit/CustomData.tpl" isSingleRecordEdit=false}</div>
{else}
{include file="CRM/Contact/Form/Edit/$name.tpl"}
{/if}
Expand Down
6 changes: 3 additions & 3 deletions templates/CRM/Custom/Form/Edit/CustomData.tpl
Original file line number Diff line number Diff line change
@@ -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}
<a href="#" class="crm-hover-button crm-custom-value-del" title="{ts 1=$cd_edit.title}Delete %1{/ts}"
data-post='{ldelim}"valueID": "{$tableID}", "groupID": "{$group_id}", "contactId": "{$contactId}", "key": "{crmKey name='civicrm/ajax/customvalue'}"{rdelim}'>
Expand All @@ -9,7 +9,7 @@
{if $cd_edit.help_pre}
<div class="messages help">{$cd_edit.help_pre}</div>
{/if}
<table {if empty($isSingleRecordEdit)}class="form-layout-compressed"{/if}>
<table {if !$isSingleRecordEdit}class="form-layout-compressed"{/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
Expand All @@ -25,7 +25,7 @@
</table>
<div class="spacer"></div>
{if $cd_edit.help_post}<div class="messages help">{$cd_edit.help_post}</div>{/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 *}
<div class="messages help">
Expand Down

0 comments on commit 71f0493

Please sign in to comment.