$controller->reset();
$controller->set('cid', $this->_contactId);
$controller->set('context', 'pledge');
+ $controller->set('limit', '25');
$controller->process();
$controller->run();
// check logged in url permission
CRM_Contact_Page_View::checkUserPermission($this);
-
- // set page title
- CRM_Contact_Page_View::setTitle($this->_contactId);
}
$this->assign('action', $this->_action);
$this->preProcess();
// check if we can process credit card registration
- CRM_Core_Payment::allowBackofficeCreditCard($this);
+ $this->assign('newCredit', CRM_Core_Config::isEnabledBackOfficeCreditCardPayments());
- $this->setContext();
+ self::setContext($this);
if ($this->_action & CRM_Core_Action::VIEW) {
$this->view();
return parent::run();
}
- function setContext() {
- $context = CRM_Utils_Request::retrieve('context', 'String', $this, FALSE, 'search');
+ public static function setContext(&$form) {
+ $context = CRM_Utils_Request::retrieve('context', 'String', $form, FALSE, 'search');
- $qfKey = CRM_Utils_Request::retrieve('key', 'String', $this);
+ $qfKey = CRM_Utils_Request::retrieve('key', 'String', $form);
//validate the qfKey
if (!CRM_Utils_Rule::qfKey($qfKey)) {
$qfKey = NULL;
case 'pledge':
$url = CRM_Utils_System::url('civicrm/contact/view',
- "reset=1&force=1&cid={$this->_contactId}&selectedChild=pledge"
+ "reset=1&force=1&cid={$form->_contactId}&selectedChild=pledge"
);
break;
case 'activity':
$url = CRM_Utils_System::url('civicrm/contact/view',
- "reset=1&force=1&cid={$this->_contactId}&selectedChild=activity"
+ "reset=1&force=1&cid={$form->_contactId}&selectedChild=activity"
);
break;
default:
$cid = NULL;
- if ($this->_contactId) {
- $cid = '&cid=' . $this->_contactId;
+ if ($form->_contactId) {
+ $cid = '&cid=' . $form->_contactId;
}
$url = CRM_Utils_System::url('civicrm/pledge/search',
'force=1' . $cid