$sql="ALTER TABLE civicrm_petition_email ADD COLUMN `recipients` text COMMENT 'The name and email address of additional targets that should receive a copy of all petitions signed, separated by line breaks.'";
$dao=CRM_Core_DAO::executeQuery($sql);
// Now transfer the data to the new tables
$sql="SELECT petition_id, recipient_email, recipient_name FROM civicrm_petition_email";
cj("#user_message").after("<div id='profileMissingMessage' style='background-color: #FF9999; border: 1px solid #CC3333; display: inline-block; font-size: 85%; margin-left: 1ex; padding: 0.5ex; vertical-align: top;'>"+ts("This field is not in the activity profile you selected")+"</div>");
@@ -204,10 +228,14 @@ function petitionemail_get_template($object) {
// Identify the fields to display (keys) with the descriptions that
// should display with them (values)
$fields=array(
'group_id'=>ts("Select the group containing the contacst that you want to receive the petition."),
'matching_fields'=>ts("If the user and the target have the same value for this field, then the user's petition will be sent to the matching target."),
'location_type_id'=>ts("A target contact can have more than one email address. Choose the email location that should be used when sending the petition."),
'email_petition'=>ts("Should signatures generate an email to the petition's target?"),
'recipient'=>ts("Enter targets that receive copies of all petitions in the form: 'First name Last name' <email@example.org>"),
'recipients'=>ts("Enter additional targets that receive copies of all petitions in the form: 'First name Last name' <email@example.org>. Separate multiple recipients with line breaks."),
'user_message'=>ts("Select a field that will have the signer's custom message. Make sure it is included in the Activity Profile you selected."),
'default_message'=>ts("Enter the default message to be included in the email."),
'subject'=>ts("Enter the subject line that should appear in the target email.")
);
$ret='';
...
...
@@ -229,9 +257,10 @@ function petitionemail_get_template($object) {
@@ -9,6 +9,9 @@ CREATE TABLE IF NOT EXISTS `civicrm_petition_email` (
`default_message`textCOMMENT'The default message for the petition',
`message_field`int(10)unsignedNOTNULLDEFAULT'0'COMMENT'The ID of the custom field used for petition messages.',
`subject`varchar(128)DEFAULTNULLCOMMENT'The subject line for outgoing emails.',
`recipients`textCOMMENT'The name and email address of additional targets that should receive a copy of all petitions signed, separated by line breaks.',
PRIMARYKEY(`petition_id`),
KEY`petition_id`(`petition_id`)
)ENGINE=InnoDBDEFAULTCHARSET=utf8COMMENT='Stores recipient and message information for petitions.';