Skip to content
Snippets Groups Projects
Commit 59eae178 authored by Kurund Jalmi's avatar Kurund Jalmi
Browse files

Merge pull request #744 from kurund/notice-fixes

fixed more notices on pledge and while sending email receipt
parents d5a623f2 3f4b742c
No related branches found
No related tags found
No related merge requests found
......@@ -187,15 +187,15 @@ class CRM_Contribute_Form_AdditionalInfo {
* @return void
*
*/
function buildPaymentReminders(&$form) {
static function buildPaymentReminders(&$form) {
//PaymentReminders section
$form->add('hidden', 'hidden_PaymentReminders', 1);
$form->add('text', 'initial_reminder_day', ts('Send Initial Reminder'), array('size' => 3));
$this->addRule('initial_reminder_day', ts('Please enter a valid reminder day.'), 'positiveInteger');
$form->addRule('initial_reminder_day', ts('Please enter a valid reminder day.'), 'positiveInteger');
$form->add('text', 'max_reminders', ts('Send up to'), array('size' => 3));
$this->addRule('max_reminders', ts('Please enter a valid No. of reminders.'), 'positiveInteger');
$form->addRule('max_reminders', ts('Please enter a valid No. of reminders.'), 'positiveInteger');
$form->add('text', 'additional_reminder_day', ts('Send additional reminders'), array('size' => 3));
$this->addRule('additional_reminder_day', ts('Please enter a valid additional reminder day.'), 'positiveInteger');
$form->addRule('additional_reminder_day', ts('Please enter a valid additional reminder day.'), 'positiveInteger');
}
/**
......@@ -350,8 +350,8 @@ class CRM_Contribute_Form_AdditionalInfo {
*
* @return None.
*/
function emailReceipt(&$form, &$params, $ccContribution = FALSE) {
$this->assign('receiptType', 'contribution');
static function emailReceipt(&$form, &$params, $ccContribution = FALSE) {
$form->assign('receiptType', 'contribution');
// Retrieve Financial Type Name from financial_type_id
$params['contributionType_name'] = CRM_Core_DAO::getFieldValue('CRM_Financial_DAO_FinancialType',
$params['financial_type_id']);
......@@ -399,11 +399,11 @@ class CRM_Contribute_Form_AdditionalInfo {
}
if (CRM_Utils_Array::value('fulfilled_date', $params)) {
$this->assign('fulfilled_date', CRM_Utils_Date::processDate($params['fulfilled_date']));
$form->assign('fulfilled_date', CRM_Utils_Date::processDate($params['fulfilled_date']));
}
}
$this->assign('ccContribution', $ccContribution);
$form->assign('ccContribution', $ccContribution);
if ($ccContribution) {
//build the name.
$name = CRM_Utils_Array::value('billing_first_name', $params);
......@@ -412,7 +412,7 @@ class CRM_Contribute_Form_AdditionalInfo {
}
$name .= ' ' . CRM_Utils_Array::value('billing_last_name', $params);
$name = trim($name);
$this->assign('billingName', $name);
$form->assign('billingName', $name);
//assign the address formatted up for display
$addressParts = array(
......@@ -427,13 +427,13 @@ class CRM_Contribute_Form_AdditionalInfo {
foreach ($addressParts as $name => $field) {
$addressFields[$name] = CRM_Utils_Array::value($field, $params);
}
$this->assign('address', CRM_Utils_Address::format($addressFields));
$form->assign('address', CRM_Utils_Address::format($addressFields));
$date = CRM_Utils_Date::format($params['credit_card_exp_date']);
$date = CRM_Utils_Date::mysqlToIso($date);
$this->assign('credit_card_type', CRM_Utils_Array::value('credit_card_type', $params));
$this->assign('credit_card_exp_date', $date);
$this->assign('credit_card_number',
$form->assign('credit_card_type', CRM_Utils_Array::value('credit_card_type', $params));
$form->assign('credit_card_exp_date', $date);
$form->assign('credit_card_number',
CRM_Utils_System::mungeCreditCard($params['credit_card_number'])
);
}
......@@ -485,15 +485,15 @@ class CRM_Contribute_Form_AdditionalInfo {
list($contributorDisplayName,
$contributorEmail
) = CRM_Contact_BAO_Contact_Location::getEmailDetails($params['contact_id']);
$this->assign('contactID', $params['contact_id']);
$this->assign('contributionID', $params['contribution_id']);
$form->assign('contactID', $params['contact_id']);
$form->assign('contributionID', $params['contribution_id']);
if (CRM_Utils_Array::value('currency', $params)) {
$this->assign('currency', $params['currency']);
$form->assign('currency', $params['currency']);
}
if (CRM_Utils_Array::value('receive_date', $params)) {
$this->assign('receive_date', CRM_Utils_Date::processDate($params['receive_date']));
$form->assign('receive_date', CRM_Utils_Date::processDate($params['receive_date']));
}
list($sendReceipt, $subject, $message, $html) = CRM_Core_BAO_MessageTemplates::sendTemplate(
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment