CRM-16761 - User message improvements.
[civicrm-core.git] / CRM / Event / Form / Search.php
index 7f7384ca655a095b54b6f7754928f85aadb87d6c..92b7aea6c22ddfe7814fc235068be9a71993e099 100644 (file)
@@ -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 Civi::settings()->get('contact_undelete')) {
+      $this->addElement('checkbox', 'deleted_contacts', ts('Search in Trash') . '<br />' . ts('(deleted contacts)'));
+    }
+
     CRM_Event_BAO_Query::buildSearchForm($this);
 
     $rows = $this->get('rows');