Skip to content

Commit

Permalink
Expose mapping search task to Search Kit
Browse files Browse the repository at this point in the history
  • Loading branch information
seamuslee001 committed Feb 8, 2021
1 parent d0e1821 commit cbde30b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion CRM/Contact/Form/Task.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ public static function preProcessCommon(&$form) {
$form->_contactIds = [];
$form->_contactTypes = [];

$isStandAlone = in_array('task', $form->urlPath) || in_array('standalone', $form->urlPath);
$isStandAlone = in_array('task', $form->urlPath) || in_array('standalone', $form->urlPath) || in_array('map', $form->urlPath);
if ($isStandAlone) {
[$form->_task, $title] = CRM_Contact_Task::getTaskAndTitleByClass(get_class($form));
if (!array_key_exists($form->_task, CRM_Contact_Task::permissionedTaskTitles(CRM_Core_Permission::getPermission()))) {
Expand Down
2 changes: 2 additions & 0 deletions CRM/Contact/Task.php
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,8 @@ public static function tasks() {
'title' => ts('Map contacts'),
'class' => 'CRM_Contact_Form_Task_Map',
'result' => FALSE,
'url' => 'civicrm/contact/map',
'icon' => 'fa-map',
);
}

Expand Down

0 comments on commit cbde30b

Please sign in to comment.