Skip to content

Commit 4e6dcc8

Browse files
committed
- (Bug Fix) Fixed some issue with sending body content in the front end email form
- (Feature) Added template parsing option to the front end email parcel
1 parent 8e7594d commit 4e6dcc8

File tree

3 files changed

+10
-5
lines changed

3 files changed

+10
-5
lines changed

controllers/Postmaster_FormsController.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,9 @@ public function actionSend()
2020
}
2121
else
2222
{
23-
$event = new Event($this, array(
23+
craft()->postmaster_forms->onEmailFormSend(new Event($this, array(
2424
'email' => $model
25-
));
26-
27-
craft()->postmaster_forms->onEmailFormSend($event);
25+
)));
2826

2927
$this->redirect(craft()->request->getPost('redirect'));
3028
}

core/parcel_types/EmailFormParcelType.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ public function init()
2525

2626
$this->craft()->on('postmaster_forms.emailFormSend', function(Event $event) use ($parcelType)
2727
{
28-
$parcelType->getParcelModel()->parse(array_merge($event->params, array(
28+
$parcelType->parse(array_merge($event->params, array(
2929
'post' => $this->craft()->request->getPost()
3030
)));
3131

templates/parcel_types/email_form/settings.html

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,11 @@
11
{% import "_includes/forms" as forms %}
2+
{% import "postmaster/_includes/forms" as postmaster %}
3+
4+
{{ postmaster.templateFields({
5+
section: 'parcelTypeSettings',
6+
name: 'emailForm',
7+
settings: settings
8+
}) }}
29

310
{{ forms.textareaField({
411
label: "Extra Conditionals"|t,

0 commit comments

Comments
 (0)