From 8f83bac7c879ef9d3d8b24f006f6294531b15bdf Mon Sep 17 00:00:00 2001 From: Coleman Watts Date: Tue, 30 Jun 2015 16:58:14 -0400 Subject: [PATCH] CRM-11856 - Add help text when creating a smart group --- CRM/Contact/Form/Task/SaveSearch.php | 4 ++++ templates/CRM/Contact/Form/Task/SaveSearch.tpl | 12 +++++++++--- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/CRM/Contact/Form/Task/SaveSearch.php b/CRM/Contact/Form/Task/SaveSearch.php index 2d53aea649..fc9520397d 100644 --- a/CRM/Contact/Form/Task/SaveSearch.php +++ b/CRM/Contact/Form/Task/SaveSearch.php @@ -87,6 +87,9 @@ class CRM_Contact_Form_Task_SaveSearch extends CRM_Contact_Form_Task { $query = new CRM_Contact_BAO_Query($this->get('queryParams')); $qill = $query->qill(); + // Values from the search form + $formValues = $this->controller->exportValues(); + // need to save qill for the smarty template $this->assign('qill', $qill); @@ -135,6 +138,7 @@ class CRM_Contact_Form_Task_SaveSearch extends CRM_Contact_Form_Task { } else { $this->addDefaultButtons(ts('Save Smart Group')); + $this->assign('partiallySelected', $formValues['radio_ts'] != 'ts_all'); } $this->addRule('title', ts('Name already exists in Database.'), 'objectExists', array('CRM_Contact_DAO_Group', $groupID, 'title') diff --git a/templates/CRM/Contact/Form/Task/SaveSearch.tpl b/templates/CRM/Contact/Form/Task/SaveSearch.tpl index 6bde5b93dd..3bc73a556c 100644 --- a/templates/CRM/Contact/Form/Task/SaveSearch.tpl +++ b/templates/CRM/Contact/Form/Task/SaveSearch.tpl @@ -25,16 +25,22 @@ *}

{ts}Smart Group{/ts}

- {if $qill[0]} +
+

{ts}This smart group will stay up-to-date with all contacts who meet the search criteria.{/ts}

+ {if !empty($partiallySelected)} +

{ts}NOTE: Contacts selected on the search results are not relevant here; all contacts that meet the following criteria will be in the group.{/ts}

+ {/if} + {if !empty($qill[0])}
    {foreach from=$qill[0] item=criteria}
  • {$criteria}
  • {/foreach}
-
- {/if} + {/if} +

{docURL page='user/current/organising-your-data/smart-groups/'}

+
-- 2.25.1
{$form.title.label}