From 48242ab6d198671e5f7231e0ecf61c4901e21abc Mon Sep 17 00:00:00 2001 From: Mattias Michaux Date: Tue, 17 Nov 2015 10:35:33 +0100 Subject: [PATCH] Allow filtering on deleted participants. --- CRM/Event/Form/Search.php | 4 ++++ templates/CRM/Event/Form/Search.tpl | 7 +++++++ 2 files changed, 11 insertions(+) diff --git a/CRM/Event/Form/Search.php b/CRM/Event/Form/Search.php index 7f7384ca65..c90d8277a0 100644 --- a/CRM/Event/Form/Search.php +++ b/CRM/Event/Form/Search.php @@ -170,6 +170,10 @@ class CRM_Event_Form_Search extends CRM_Core_Form_Search { parent::buildQuickForm(); $this->addSortNameField(); + if (CRM_Core_Permission::check('access deleted contacts') and CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME, 'contact_undelete', NULL)) { + $this->addElement('checkbox', 'deleted_contacts', ts('Search deleted participants')); + } + CRM_Event_BAO_Query::buildSearchForm($this); $rows = $this->get('rows'); diff --git a/templates/CRM/Event/Form/Search.tpl b/templates/CRM/Event/Form/Search.tpl index 6f110d6842..eff497fdc7 100644 --- a/templates/CRM/Event/Form/Search.tpl +++ b/templates/CRM/Event/Form/Search.tpl @@ -38,6 +38,13 @@ {$form.sort_name.label}  {$form.sort_name.html|crmAddClass:'twenty'}   {$form.buttons.html} + {if $form.deleted_contacts} + + + {$form.deleted_contacts.html}  {$form.deleted_contacts.label} + + + {/if} -- 2.25.1