mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-09 15:35:47 +01:00
render email footer partial
This commit is contained in:
@@ -47,10 +47,14 @@ var fs = require('fs'),
|
|||||||
Emailer.sendToEmail = function(template, email, language, params, callback) {
|
Emailer.sendToEmail = function(template, email, language, params, callback) {
|
||||||
function renderAndTranslate(tpl, params, callback) {
|
function renderAndTranslate(tpl, params, callback) {
|
||||||
async.waterfall([
|
async.waterfall([
|
||||||
function (next) {
|
function(next) {
|
||||||
|
app.render('emails/partials/footer' + (tpl.indexOf('_plaintext') !== -1 ? '_plaintext' : ''), params, next);
|
||||||
|
},
|
||||||
|
function(footer, next) {
|
||||||
|
params.footer = footer;
|
||||||
app.render(tpl, params, next);
|
app.render(tpl, params, next);
|
||||||
},
|
},
|
||||||
function (html, next) {
|
function(html, next) {
|
||||||
translator.translate(html, lang, function(translated) {
|
translator.translate(html, lang, function(translated) {
|
||||||
next(null, translated);
|
next(null, translated);
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user