Alternate commit for CRM-17364. Minor wording changes and change to the way where...
authorSeamus Lee <seamuslee001@gmail.com>
Thu, 15 Oct 2015 05:40:40 +0000 (05:40 +0000)
committerSeamus Lee <seamuslee001@gmail.com>
Thu, 15 Oct 2015 05:46:56 +0000 (05:46 +0000)
CRM/Member/BAO/Query.php
templates/CRM/Member/Form/Search.hlp
templates/CRM/Member/Form/Search/Common.tpl

index ea4f03eb2fbcc84d009eb56f2e3a46783ae868b1..dabf18fb128116f19e1e973a9eead6572a792931 100644 (file)
@@ -312,6 +312,12 @@ class CRM_Member_BAO_Query {
         }
         $query->_tables['civicrm_membership'] = $query->_whereTables['civicrm_membership'] = 1;
         return;
+
+      case 'member_is_override':
+        $query->_where[$grouping][] = CRM_Contact_BAO_Query::buildClause("civicrm_membership.is_override", $op, $value, "Boolean");
+        $query->_qill[$grouping][] = $value ? ts("Is Membership Status overriden? Yes") : ts("Is Membership Status overriden? No");
+        $query->_tables['civicrm_membership'] = $query->_whereTables['civicrm_membership'] = 1;
+        return;
     }
   }
 
@@ -389,6 +395,7 @@ class CRM_Member_BAO_Query {
         'max_related' => 1,
         'membership_recur_id' => 1,
         'member_campaign_id' => 1,
+        'member_is_override' => 1,
       );
 
       if ($includeCustomFields) {
@@ -437,6 +444,7 @@ class CRM_Member_BAO_Query {
     $form->addYesNo('member_pay_later', ts('Pay Later?'), TRUE);
     $form->addYesNo('member_auto_renew', ts('Auto-Renew?'), TRUE);
     $form->addYesNo('member_test', ts('Membership is a Test?'), TRUE);
+    $form->addYesNo('member_is_override', ts('Membership Status Is Override?'), TRUE);
 
     // add all the custom  searchable fields
     $extends = array('Membership');
index ce8a19615318090ccebb5f9fa19293c513720cbe..41805c01c363239e6ebbaa59b2f59a67dd85caf9 100644 (file)
     <li>{ts}Select neither to show all members, regardless of whether they are the direct member or inherit it through a relationship,{/ts}</li>
   </ul>
 {/htxt}
+{htxt id="id-member_is_override-title"}
+  {ts}Membership Status Is Override?{/ts}
+{/htxt}
+{htxt id="id-member_is_override"}
+  <ul>
+    <li>{ts}Select "Yes" to display only membership with Status Override set (membership is manually forced to a specific status){/ts}</li>
+    <li>{ts}Select "No" to display only memberships without Status Override set (membership is subject to the normal status rules){/ts}</li>
+    <li>{ts}Select neither to show all memberships{/ts}</li>
+  </ul>
+{/htxt}
index 38cebec0914b6bb9c877ed0db60684ea4439f156..b83dca3838f636a7692bcce8e87b2f13739903ac 100644 (file)
     <p>
     {$form.member_auto_renew.label}&nbsp;{$form.member_auto_renew.html}
     </p>
+    <p>
+    {$form.member_is_override.label}
+    {help id="id-member_is_override" file="CRM/Member/Form/Search.hlp"}
+    {$form.member_is_override.html}
+    </p>
   </td>
 </tr>