*/
public function buildQuickForm() {
parent::buildQuickForm();
- $this->addElement('text', 'sort_name', ts('Participant Name or Email'), CRM_Core_DAO::getAttribute('CRM_Contact_DAO_Contact', 'sort_name'));
+ $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);
foreach ((array) $this->_formValues['participant_role_id'] as $participantRole) {
$escapedRoles[] = CRM_Utils_Type::escape($participantRole, 'String');
}
- $seatClause[] = '( participant.role_id IN ( "' . implode('" , "', $escapedRoles) . '" ) )';
+ $seatClause[] = "( participant.role_id IN ( '" . implode("' , '", $escapedRoles) . "' ) )";
}
// CRM-15379
}
+ /**
+ * Get the label for the sortName field if email searching is on.
+ *
+ * (email searching is a setting under search preferences).
+ *
+ * @return string
+ */
+ protected function getSortNameLabelWithEmail() {
+ return ts('Participant Name or Email');
+ }
+
+ /**
+ * Get the label for the sortName field if email searching is off.
+ *
+ * (email searching is a setting under search preferences).
+ *
+ * @return string
+ */
+ protected function getSortNameLabelWithOutEmail() {
+ return ts('Participant Name');
+ }
+
/**
* The post processing of the form gets done here.
*