From: Yosef Romano Date: Tue, 2 Aug 2016 22:21:12 +0000 (-0700) Subject: Add grouping options for contribution thank you letters X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=6edcec04557e8d3abf396d3560742ec9605de0a7;p=civicrm-core.git Add grouping options for contribution thank you letters --- 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;