Skip to content

Commit

Permalink
1.1.3-pl
Browse files Browse the repository at this point in the history
  • Loading branch information
Jason committed Nov 16, 2017
1 parent e43ebc9 commit ca1c7a7
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 9 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"extra": {
"package_name": "FormItCampaignMonitor",
"namespace": "formitcampaignmonitor",
"version": "1.1.1",
"version": "1.1.3",
"release": "pl",
"category": "FormItCampaignMonitor"
}
Expand Down
8 changes: 8 additions & 0 deletions docs/changelog.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
Changelog for FormItCampaignMonitor

FormItCampaignMonitor 1.1.3
---------------------------------
Remove unneeded vars from top of cmSubscribe

FormItCampaignMonitor 1.1.2
---------------------------------
Fall back to `Email` when no replyToEmail` provided

FormItCampaignMonitor 1.0.0
---------------------------------
Initial Version
4 changes: 0 additions & 4 deletions elements/snippets/cmSubscribe.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,6 @@

$values = $hook->getValues();

// formFields is set by formalicious
$formFields = $modx->getOption('formFields', $formit->config, false);
$cmSubscribeListId['Text'] = $modx->getOption('cmSubscribeListId', $hook->formit->config, '');

$api_key = $modx->getOption('formitcampaignmonitor.api_key');
$default_list_id = $modx->getOption('formitcampaignmonitor.default_list_id');
$list_id = $modx->getOption('cmSubscribeListId', $hook->formit->config, $default_list_id);
Expand Down
10 changes: 6 additions & 4 deletions elements/snippets/cmTransactionalSend.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@
$default_smart_email_id = $modx->getOption('formitcampaignmonitor.default_smart_email_id');
$smart_email_id = $modx->getOption('cmSmartEmailId', $hook->formit->config, $default_smart_email_id);

$emailTo = $modx->getOption('emailTo', $hook->formit->config, '', true);
$subject = $modx->getOption('emailSubject', $hook->formit->config, '', true);
$emailTo = $modx->getOption('emailTo', $hook->formit->config, null, true);
$subject = $modx->getOption('emailSubject', $hook->formit->config, null, true);
$emailToName = $modx->getOption('emailToName', $hook->formit->config, $emailTo, true);
$replyTo = $modx->getOption('emailReplyTo', $hook->formit->config, '');
$replyToName = $modx->getOption('emailReplyToName', $hook->formit->config, '');
$replyTo = $modx->getOption('emailReplyTo', $hook->formit->config, null);
$replyToName = $modx->getOption('emailReplyToName', $hook->formit->config, null);


if ($formFields) {
Expand Down Expand Up @@ -168,6 +168,8 @@

if(!empty($replyTo)){
$message['Data']['replyToEmail'] = $replyTo;
} elseif (!empty($dataArray['Email'])) {
$message['Data']['replyToEmail'] = $message['Data']['Email'];
}
if(!empty($replyToName)){
$message['Data']['replyToName'] = $replyToName;
Expand Down

0 comments on commit ca1c7a7

Please sign in to comment.