Skip to content

Commit

Permalink
Merge branch 'release/0.2.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
rhukster committed Sep 11, 2015
2 parents 9174501 + 41590dd commit 1691ff7
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 6 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# v0.2.1
## 09/11/2015

1. [](#bugfix)
* Fix onFormProcessed event

# v0.2.0
## 08/11/2015

Expand Down
2 changes: 1 addition & 1 deletion blueprints.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: Email
version: 0.2.0
version: 0.2.1
description: Enables the emailing system for Grav
icon: envelope
author:
Expand Down
13 changes: 8 additions & 5 deletions email.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

use Grav\Common\Plugin;
use Grav\Common\Twig;
use RocketTheme\Toolbox\Event\Event;

class EmailPlugin extends Plugin
{
Expand Down Expand Up @@ -40,17 +41,19 @@ public function onPluginsInitialized()
/**
* Send email when processing the form data.
*
* @param Form $form
* @param string $task
* @param array $params
* @param Event $event
*/
public function onFormProcessed(Form $form, $task, $params)
public function onFormProcessed(Event $event)
{
$form = $event['form'];
$action = $event['action'];
$params = $event['params'];

if (!$this->email->enabled()) {
return;
}

switch ($task) {
switch ($action) {
case 'email':
/** @var Twig $twig */
$twig = $this->grav['twig'];
Expand Down

0 comments on commit 1691ff7

Please sign in to comment.