}
}
- global $tsLocale;
+ $tsLocale = CRM_Core_I18n::getLocale();
// Dynamic localization script
$this->addScriptUrl(CRM_Utils_System::url('civicrm/ajax/l10n-js/' . $tsLocale, array('r' => $this->getCacheCode())), $jsWeight++, $region);
$items[] = "js/crm.optionEdit.js";
}
- global $tsLocale;
+ $tsLocale = CRM_Core_I18n::getLocale();
// Add localized jQuery UI files
if ($tsLocale && $tsLocale != 'en_US') {
// Search for i18n file in order of specificity (try fr-CA, then fr)
/**
* Provide a list of available entityRef filters.
- * FIXME: This function doesn't really belong in this class
- * @TODO: Provide a sane way to extend this list for other entities - a hook or??
+ * @todo: move component filters into their respective components (e.g. CiviEvent)
+ *
* @return array
*/
public static function getEntityRefFilters() {
array('key' => 'country', 'value' => ts('Country'), 'entity' => 'address'),
array('key' => 'gender_id', 'value' => ts('Gender')),
array('key' => 'is_deceased', 'value' => ts('Deceased')),
+ array('key' => 'source', 'value' => ts('Contact Source'), 'type' => 'text'),
);
if (in_array('CiviCase', $config->enableComponents)) {
}
}
+ CRM_Utils_Hook::entityRefFilters($filters);
+
return $filters;
}