$this->_voterIds = $this->_contactIds = $this->_componentIds = $ids;
$this->assign('totalSelectedContacts', count($this->_contactIds));
-
- //set the context for redirection for any task actions
- $session = CRM_Core_Session::singleton();
- $qfKey = CRM_Utils_Request::retrieve('qfKey', 'String', $this);
- $urlParams = 'force=1';
- if (CRM_Utils_Rule::qfKey($qfKey)) {
- $urlParams .= '&qfKey=' . $qfKey;
- }
- $session->replaceUserContext(CRM_Utils_System::url('civicrm/survey/search', $urlParams));
+ $this->setNextUrl('survey');
}
/**
$form->_participantIds = $form->_componentIds = $ids;
- //set the context for redirection for any task actions
- $session = CRM_Core_Session::singleton();
-
- $qfKey = CRM_Utils_Request::retrieve('qfKey', 'String', $form);
- $urlParams = 'force=1';
- if (CRM_Utils_Rule::qfKey($qfKey)) {
- $urlParams .= "&qfKey=$qfKey";
- }
-
- $searchFormName = strtolower($form->get('searchFormName'));
- if ($searchFormName == 'search') {
- $session->replaceUserContext(CRM_Utils_System::url('civicrm/event/search', $urlParams));
- }
- else {
- $session->replaceUserContext(CRM_Utils_System::url("civicrm/contact/search/$searchFormName",
- $urlParams
- ));
- }
+ $form->setNextUrl('event');
}
/**
$form->_grantIds = $form->_componentIds = $ids;
- //set the context for redirection for any task actions
- $qfKey = CRM_Utils_Request::retrieve('qfKey', 'String', $form);
- $urlParams = 'force=1';
- if (CRM_Utils_Rule::qfKey($qfKey)) {
- $urlParams .= "&qfKey=$qfKey";
- }
-
- $session = CRM_Core_Session::singleton();
- $session->replaceUserContext(CRM_Utils_System::url('civicrm/grant/search', $urlParams));
+ $form->setNextUrl('grant');
}
/**
}
$form->_memberIds = $form->_componentIds = $ids;
-
- //set the context for redirection for any task actions
- $session = CRM_Core_Session::singleton();
-
- $qfKey = CRM_Utils_Request::retrieve('qfKey', 'String', $form);
- $urlParams = 'force=1';
- if (CRM_Utils_Rule::qfKey($qfKey)) {
- $urlParams .= "&qfKey=$qfKey";
- }
-
- $searchFormName = strtolower($form->get('searchFormName'));
- if ($searchFormName === 'search') {
- $session->replaceUserContext(CRM_Utils_System::url('civicrm/member/search', $urlParams));
- }
- else {
- $session->replaceUserContext(CRM_Utils_System::url("civicrm/contact/search/$searchFormName",
- $urlParams
- ));
- }
+ $form->setNextUrl('member');
}
/**
/**
* Common pre-processing.
*
- * @param CRM_Core_Form $form
+ * @param CRM_Pledge_Form_Task $form
*/
public static function preProcessCommon(&$form) {
$form->_pledgeIds = [];
}
$form->_pledgeIds = $form->_componentIds = $ids;
-
- // set the context for redirection for any task actions
- $qfKey = CRM_Utils_Request::retrieve('qfKey', 'String', $form);
- $urlParams = 'force=1';
- if (CRM_Utils_Rule::qfKey($qfKey)) {
- $urlParams .= "&qfKey=$qfKey";
- }
-
- $session = CRM_Core_Session::singleton();
- $session->replaceUserContext(CRM_Utils_System::url('civicrm/pledge/search', $urlParams));
+ $form->setNextUrl('pledge');
}
/**