Skip to content

Commit

Permalink
Merge pull request #22140 from eileenmcnaughton/cust_case
Browse files Browse the repository at this point in the history
Assign cgCount in Case custom data form
  • Loading branch information
colemanw authored Nov 27, 2021
2 parents 96840c0 + 9d98d4f commit f294e7e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion CRM/Case/Form/CustomData.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ public function preProcess() {
$this->assign('groupID', $this->_groupID);
$this->assign('subType', $this->_subTypeID);
$this->assign('contactID', $this->_contactID);
$this->assign('cgCount');
}

/**
Expand Down Expand Up @@ -148,7 +149,7 @@ public function postProcess() {
public function formatCustomDataChangesForDetail($params) {
$formattedDetails = [];
foreach ($params as $customField => $newCustomValue) {
if (substr($customField, 0, 7) == 'custom_') {
if (substr($customField, 0, 7) === 'custom_') {
if (($this->_defaults[$customField] ?? '') === $newCustomValue) {
// Don't show values that did not change
continue;
Expand Down
2 changes: 1 addition & 1 deletion templates/CRM/Custom/Form/CustomData.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
</div>
</div>
{/if}
{if isset($cgCount)}
{if $cgCount}
<div id="custom_group_{$group_id}_{$cgCount}"></div>
{else}
<div id="custom_group_{$group_id}"></div>
Expand Down

0 comments on commit f294e7e

Please sign in to comment.