From 07e1389d4dab5f37d6e7913c1591d5544dd24027 Mon Sep 17 00:00:00 2001 From: Seamus Lee Date: Thu, 15 Oct 2015 05:40:40 +0000 Subject: [PATCH] Alternate commit for CRM-17364. Minor wording changes and change to the way where clause is handled --- CRM/Member/BAO/Query.php | 8 ++++++++ templates/CRM/Member/Form/Search.hlp | 10 ++++++++++ templates/CRM/Member/Form/Search/Common.tpl | 5 +++++ 3 files changed, 23 insertions(+) diff --git a/CRM/Member/BAO/Query.php b/CRM/Member/BAO/Query.php index ea4f03eb2f..dabf18fb12 100644 --- a/CRM/Member/BAO/Query.php +++ b/CRM/Member/BAO/Query.php @@ -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'); diff --git a/templates/CRM/Member/Form/Search.hlp b/templates/CRM/Member/Form/Search.hlp index ce8a196153..41805c01c3 100644 --- a/templates/CRM/Member/Form/Search.hlp +++ b/templates/CRM/Member/Form/Search.hlp @@ -33,3 +33,13 @@
  • {ts}Select neither to show all members, regardless of whether they are the direct member or inherit it through a relationship,{/ts}
  • {/htxt} +{htxt id="id-member_is_override-title"} + {ts}Membership Status Is Override?{/ts} +{/htxt} +{htxt id="id-member_is_override"} + +{/htxt} diff --git a/templates/CRM/Member/Form/Search/Common.tpl b/templates/CRM/Member/Form/Search/Common.tpl index 38cebec091..b83dca3838 100644 --- a/templates/CRM/Member/Form/Search/Common.tpl +++ b/templates/CRM/Member/Form/Search/Common.tpl @@ -52,6 +52,11 @@

    {$form.member_auto_renew.label} {$form.member_auto_renew.html}

    +

    + {$form.member_is_override.label} + {help id="id-member_is_override" file="CRM/Member/Form/Search.hlp"} + {$form.member_is_override.html} +

    -- 2.25.1