diff --git a/CRM/Contact/Form/Search/Criteria.php b/CRM/Contact/Form/Search/Criteria.php index bbebe40d7366..7ebaa89e9002 100644 --- a/CRM/Contact/Form/Search/Criteria.php +++ b/CRM/Contact/Form/Search/Criteria.php @@ -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(); @@ -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); diff --git a/templates/CRM/Contact/Form/Search/Criteria/Basic.tpl b/templates/CRM/Contact/Form/Search/Criteria/Basic.tpl index 2f605153cd27..8b93dbbfc74b 100644 --- a/templates/CRM/Contact/Form/Search/Criteria/Basic.tpl +++ b/templates/CRM/Contact/Form/Search/Criteria/Basic.tpl @@ -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}