X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=CRM%2FContact%2FForm%2FSearch.php;h=64da4325b87a6c53d1168ab526a65dd20ff4078d;hb=4755bcde43cdb3c464a12c42ef73b01c0ad0b4a1;hp=7a0083b2f1209c69cbcea8df672b2b5b475c3de5;hpb=845bc17a66f2ef2ca7c819fbe99ec646f0d42634;p=civicrm-core.git diff --git a/CRM/Contact/Form/Search.php b/CRM/Contact/Form/Search.php index 7a0083b2f1..64da4325b8 100644 --- a/CRM/Contact/Form/Search.php +++ b/CRM/Contact/Form/Search.php @@ -1,7 +1,7 @@ addClass('crm-ajax-selection-form'); CRM_Core_Resources::singleton() // jsTree is needed for tags popup ->addScriptFile('civicrm', 'packages/jquery/plugins/jstree/jquery.jstree.js', 0, 'html-header', FALSE) @@ -459,7 +457,11 @@ class CRM_Contact_Form_Search extends CRM_Core_Form_Search { $this->addTaskMenu($tasks); } - if ($qfKeyParam = CRM_Utils_Array::value('qfKey', $this->_formValues)) { + $selectedContactIds = array(); + $qfKeyParam = CRM_Utils_Array::value('qfKey', $this->_formValues); + // We use ajax to handle selections only if the search results component_mode is set to "contacts" + if ($qfKeyParam && ($this->get('component_mode') <= 1 || $this->get('component_mode') == 7)) { + $this->addClass('crm-ajax-selection-form'); $qfKeyParam = "civicrm search {$qfKeyParam}"; $selectedContactIdsArr = CRM_Core_BAO_PrevNextCache::getSelection($qfKeyParam); $selectedContactIds = array_keys($selectedContactIdsArr[$qfKeyParam]); @@ -476,7 +478,7 @@ class CRM_Contact_Form_Search extends CRM_Core_Form_Search { } /** - * processing needed for buildForm and later + * Processing needed for buildForm and later * * @return void * @access public