return CRM_Custom_Form_CustomData::preProcess($this);
}
+ parent::preProcess();
// get price set id.
$this->_priceSetId = CRM_Utils_Array::value('priceSetId', $_GET);
$this->set('priceSetId', $this->_priceSetId);
$this->assign('priceSetId', $this->_priceSetId);
- // action
- $this->_action = CRM_Utils_Request::retrieve('action', 'String', $this, FALSE, 'add');
- $this->_id = CRM_Utils_Request::retrieve('id', 'Positive', $this);
- $this->_contactID = CRM_Utils_Request::retrieve('cid', 'Positive', $this);
- $this->_processors = array();
- $this->assign('contactID', $this->_contactID);
// check for edit permission
if (!CRM_Core_Permission::checkActionPermission('CiviMember', $this->_action)) {
- CRM_Core_Error::fatal(ts('You do not have permission to access this page'));
+ CRM_Core_Error::fatal(ts('You do not have permission to access this page.'));
}
if ($this->_action & CRM_Core_Action::DELETE) {
}
}
- $this->_context = CRM_Utils_Request::retrieve('context', 'String', $this);
- $this->assign('context', $this->_context);
-
- if ($this->_id) {
- $this->_memType = CRM_Core_DAO::getFieldValue('CRM_Member_DAO_Membership', $this->_id, 'membership_type_id');
- $this->_membershipIDs[] = $this->_id;
- }
-
- $this->_mode = CRM_Utils_Request::retrieve('mode', 'String', $this);
- $this->assign('membershipMode', $this->_mode);
-
- if ($this->_mode) {
- $this->assignPaymentRelatedVariables();
- }
-
if ($this->_action & CRM_Core_Action::ADD) {
if (!CRM_Member_BAO_Membership::statusAvailabilty($this->_contactID)) {
// all possible statuses are disabled - redirect back to contact form
);
}
$this->assign('onlinePendingContributionId', $this->_onlinePendingContributionId);
- $this->_fromEmails = CRM_Core_BAO_Email::getFromEmail();
$this->setPageTitle(ts('Membership'));
-
-
- parent::preProcess();
}
/**
$this->add('select', 'from_email_address', ts('Receipt From'), $this->_fromEmails);
$this->add('textarea', 'receipt_text_signup', ts('Receipt Message'));
- if ($this->_mode) {
-
- $this->add('select', 'payment_processor_id',
- ts('Payment Processor'),
- $this->_processors, TRUE,
- array('onChange' => "buildAutoRenew( null, this.value );")
- );
- CRM_Core_Payment_Form::buildPaymentForm($this, $this->_paymentProcessor, TRUE);
- }
// Retrieve the name and email of the contact - this will be the TO for receipt email
if ($this->_contactID) {
$this->_params['ip_address'] = CRM_Utils_System::ipAddress();
$this->_params['amount'] = $params['total_amount'];
$this->_params['currencyID'] = $config->defaultCurrency;
+ $this->_params['description'] = ts('Office Credit Card Membership Signup Contribution');
$this->_params['payment_action'] = 'Sale';
$this->_params['invoiceID'] = md5(uniqid(rand(), TRUE));
$this->_params['financial_type_id'] = $params['financial_type_id'];
//display end date w/ status message.
$endDate = $membership->end_date;
- $membershipStatues = CRM_Member_PseudoConstant::membershipStatus();
if (!in_array($membership->status_id, array(
- array_search('Cancelled', $membershipStatues),
- array_search('Expired', $membershipStatues),
+ // CRM-15475
+ array_search('Cancelled', CRM_Member_PseudoConstant::membershipStatus(NULL, " name = 'Cancelled' ", 'name', FALSE, TRUE)),
+ array_search('Expired', CRM_Member_PseudoConstant::membershipStatus()),
))
) {
$cancelled = FALSE;