Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Smarty variables] Use always-assigned isTagSet to determine if is tagset #22154

Merged
merged 1 commit into from
Nov 29, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions CRM/Core/Form/Tag.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class CRM_Core_Form_Tag {
*
* @param CRM_Core_Form $form
* Form object.
* @param string $parentNames
* @param array $parentNames
* Parent name ( tag name).
* @param string $entityTable
* Entitytable 'eg: civicrm_contact'.
Expand All @@ -43,7 +43,7 @@ public static function buildQuickForm(
&$form, $parentNames, $entityTable, $entityId = NULL, $skipTagCreate = FALSE,
$skipEntityAction = FALSE, $tagsetElementName = NULL) {
$tagset = $form->_entityTagValues = [];
$form->assign("isTagset", FALSE);
$form->assign('isTagset', FALSE);
$mode = NULL;

foreach ($parentNames as &$parentNameItem) {
Expand Down Expand Up @@ -96,8 +96,8 @@ public static function buildQuickForm(
$tagsetInfo[$mode] = [];
}
$tagsetInfo[$mode] = array_merge($tagsetInfo[$mode], $tagset);
$form->assign("tagsetInfo", $tagsetInfo);
$form->assign("isTagset", TRUE);
$form->assign('tagsetInfo', $tagsetInfo);
$form->assign('isTagset', TRUE);
}
}

Expand Down
2 changes: 1 addition & 1 deletion templates/CRM/Activity/Form/Activity.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@
</tr>
{/if}

{if !empty($tagsetInfo.activity)}
{if $isTagset}
<tr class="crm-activity-form-block-tag_set">
{include file="CRM/common/Tagset.tpl" tagsetType='activity' tableLayout=true}
</tr>
Expand Down