From 6edcec04557e8d3abf396d3560742ec9605de0a7 Mon Sep 17 00:00:00 2001 From: Yosef Romano Date: Tue, 2 Aug 2016 15:21:12 -0700 Subject: [PATCH] Add grouping options for contribution thank you letters --- CRM/Contribute/Form/Task/PDFLetter.php | 2 +- CRM/Contribute/Form/Task/PDFLetterCommon.php | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/CRM/Contribute/Form/Task/PDFLetter.php b/CRM/Contribute/Form/Task/PDFLetter.php index 8ac20f3616..49c52dbc1e 100644 --- a/CRM/Contribute/Form/Task/PDFLetter.php +++ b/CRM/Contribute/Form/Task/PDFLetter.php @@ -124,7 +124,7 @@ class CRM_Contribute_Form_Task_PDFLetter extends CRM_Contribute_Form_Task { ); $this->addElement('select', 'group_by', ts('Group contributions by'), $options, array(), "
", FALSE); // this was going to be free-text but I opted for radio options in case there was a script injection risk - $separatorOptions = array('comma' => 'Comma', 'td' => 'Horizontal Table Cell', 'tr' => 'Vertical Table Cell', 'br' => 'Line Break'); + $separatorOptions = array('comma' => 'Comma', 'td' => 'Horizontal Table Cell', 'tr' => 'Vertical Table Cell', 'br' => 'Line Break'); $this->addElement('select', 'group_by_separator', ts('Separator (grouped contributions)'), $separatorOptions); $emailOptions = array( diff --git a/CRM/Contribute/Form/Task/PDFLetterCommon.php b/CRM/Contribute/Form/Task/PDFLetterCommon.php index 5f2876bc93..bf289554bf 100644 --- a/CRM/Contribute/Form/Task/PDFLetterCommon.php +++ b/CRM/Contribute/Form/Task/PDFLetterCommon.php @@ -40,13 +40,13 @@ class CRM_Contribute_Form_Task_PDFLetterCommon extends CRM_Contact_Form_Task_PDF if ($formValues['group_by_separator'] == 'td') { $realSeparator = ""; } - elseif ($formValues['group_by_separator'] == 'tr') { - $realSeparator = ""; - } - elseif ($formValues['group_by_separator'] == 'br') { - $realSeparator = "
"; - } - } + elseif ($formValues['group_by_separator'] == 'tr') { + $realSeparator = ""; + } + elseif ($formValues['group_by_separator'] == 'br') { + $realSeparator = "
"; + } + } $separator = '****~~~~';// a placeholder in case the separator is common in the string - e.g ', ' $validated = FALSE; -- 2.25.1