From: Mattias Michaux Date: Tue, 17 Nov 2015 09:35:33 +0000 (+0100) Subject: Allow filtering on deleted participants. X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=48242ab6d198671e5f7231e0ecf61c4901e21abc;p=civicrm-core.git Allow filtering on deleted participants. --- 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}