CRM-11856 - Add help text when creating a smart group
authorColeman Watts <coleman@civicrm.org>
Tue, 30 Jun 2015 20:58:14 +0000 (16:58 -0400)
committerColeman Watts <coleman@civicrm.org>
Tue, 30 Jun 2015 21:00:15 +0000 (17:00 -0400)
CRM/Contact/Form/Task/SaveSearch.php
templates/CRM/Contact/Form/Task/SaveSearch.tpl

index 2d53aea6496a3465c349bbc4349eaed3d5c09098..fc9520397dc27e185261f23aa8e3b9cea9a8e896 100644 (file)
@@ -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')
index 6bde5b93dd294b41a40bb8e20e105117eabd5229..3bc73a556ca8ee797739cdd2e4fe2a43afa57509 100644 (file)
 *}
 <div class="crm-form-block crm-block crm-contact-task-createsmartgroup-form-block">
   <h3>{ts}Smart Group{/ts}</h3>
-  {if $qill[0]}
+  <div class="help">
+    <p>{ts}This smart group will stay up-to-date with all contacts who meet the search criteria.{/ts}</p>
+    {if !empty($partiallySelected)}
+      <p>{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}</p>
+    {/if}
+    {if !empty($qill[0])}
     <div id="search-status">
       <ul>
         {foreach from=$qill[0] item=criteria}
           <li>{$criteria}</li>
         {/foreach}
       </ul>
-      <br />
     </div>
-  {/if}
+    {/if}
+    <p>{docURL page='user/current/organising-your-data/smart-groups/'}</p>
+  </div>
   <table class="form-layout-compressed">
     <tr class="crm-contact-task-createsmartgroup-form-block-title">
       <td class="label">{$form.title.label}</td>