CRM-11856 - Copy/paste the fix to copy/pasted code
authorColeman Watts <coleman@civicrm.org>
Tue, 30 Jun 2015 21:25:15 +0000 (17:25 -0400)
committerColeman Watts <coleman@civicrm.org>
Tue, 30 Jun 2015 21:25:15 +0000 (17:25 -0400)
CRM/Event/Form/Task/SaveSearch.php
templates/CRM/Event/Form/Task/SaveSearch.tpl

index cd3886579ec4d378c051b829df06379743b91045..0d7dfbe368880b683f8f452d4b99076958d661e3 100644 (file)
@@ -71,6 +71,9 @@ class CRM_Event_Form_Task_SaveSearch extends CRM_Event_Form_Task {
     $query = new CRM_Event_BAO_Query($this->get('formValues'));
     $qill = $query->qill();
 
+    // Values from the search form
+    $formValues = $this->controller->exportValues();
+
     // need to save qill for the smarty template
     $this->assign('qill', $qill);
 
@@ -94,6 +97,7 @@ class CRM_Event_Form_Task_SaveSearch extends CRM_Event_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.'),
index 57d0d24bfb147937421bb22f43f96962e52d20b5..8d09cf8771a5cb1c2851e1e7c94f82b58765beab 100644 (file)
 <fieldset>
     <legend>{ts}Smart Group{/ts}</legend>
 
-{if $qill[0]}
-<div id="search-status">
-    <ul>
-        {foreach from=$qill item=criteria}
-          <li>{$criteria}</li>
-        {/foreach}
-    </ul>
-    <br />
-</div>
-{/if}
+  <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>
+      </div>
+    {/if}
+    <p>{docURL page='user/current/organising-your-data/smart-groups/'}</p>
+  </div>
 
  <table class="form-layout-compressed">
    <tr class="crm-event-savesearch-form-block-title">