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

Notice fixes in advanced search #22956

Merged
merged 1 commit into from
Mar 17, 2022
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
6 changes: 5 additions & 1 deletion CRM/Contact/Form/Search/Criteria.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,10 @@ public static function basic(&$form) {
}
}

// Suppress e-notices for tag fields if not set...
$form->addOptionalQuickFormElement('tag_types_text');
$form->addOptionalQuickFormElement('tag_set');
$form->addOptionalQuickFormElement('all_tag_types');
if ($form->_searchOptions['tags']) {
// multiselect for categories
$contactTags = CRM_Core_BAO_Tag::getTags();
Expand Down Expand Up @@ -82,7 +86,7 @@ public static function basic(&$form) {
$showAllTagTypes = TRUE;
}
}
$tagTypesText = implode(" or ", $tagsTypes);
$tagTypesText = implode(' or ', $tagsTypes);
if ($showAllTagTypes) {
$form->add('checkbox', 'all_tag_types', ts('Include tags used for %1', [1 => $tagTypesText]));
$form->add('hidden', 'tag_types_text', $tagTypesText);
Expand Down
1 change: 0 additions & 1 deletion templates/CRM/Contact/Form/Search/Criteria/Basic.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
{$field.label}
{if !empty($fieldSpec.help)}
{assign var=help value=$fieldSpec.help}
{capture assign=helpFile}{if $fieldSpec.help}{$fieldSpec.help}{else}''{/if}{/capture}
{help id=$help.id file=$help.file}
{/if}
<br />
Expand Down