Added standard notification footer to comment_mail template
This commit is contained in:
@@ -34,7 +34,7 @@ class CommentMailController extends BaseController
|
|||||||
list($valid, $errors) = $this->commentValidator->validateEmailCreation($values);
|
list($valid, $errors) = $this->commentValidator->validateEmailCreation($values);
|
||||||
|
|
||||||
if ($valid) {
|
if ($valid) {
|
||||||
$this->sendByEmail($values);
|
$this->sendByEmail($values, $task);
|
||||||
$values = $this->prepareComment($values);
|
$values = $this->prepareComment($values);
|
||||||
|
|
||||||
if ($this->commentModel->create($values) !== false) {
|
if ($this->commentModel->create($values) !== false) {
|
||||||
@@ -49,9 +49,9 @@ class CommentMailController extends BaseController
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function sendByEmail(array $values)
|
protected function sendByEmail(array $values, array $task)
|
||||||
{
|
{
|
||||||
$html = $this->template->render('comment_mail/email', array('email' => $values));
|
$html = $this->template->render('comment_mail/email', array('email' => $values, 'task' => $task));
|
||||||
$emails = explode_csv_field($values['emails']);
|
$emails = explode_csv_field($values['emails']);
|
||||||
|
|
||||||
foreach ($emails as $email) {
|
foreach ($emails as $email) {
|
||||||
|
|||||||
@@ -1 +1,3 @@
|
|||||||
<?= $this->text->markdown($email['comment'], true) ?>
|
<?= $this->text->markdown($email['comment'], true) ?>
|
||||||
|
|
||||||
|
<?= $this->render('notification/footer', array('task' => $task)) ?>
|
||||||
|
|||||||
Reference in New Issue
Block a user