mirror of
https://github.com/taobataoma/meanTorrent.git
synced 2026-02-28 09:10:59 +01:00
feat(invitations): add invite templates invite-sign-up-email-**
This commit is contained in:
@@ -5,6 +5,7 @@
|
||||
*/
|
||||
var path = require('path'),
|
||||
config = require(path.resolve('./config/config')),
|
||||
common = require(path.resolve('./config/lib/common')),
|
||||
mongoose = require('mongoose'),
|
||||
errorHandler = require(path.resolve('./modules/core/server/controllers/errors.server.controller')),
|
||||
validator = require('validator'),
|
||||
@@ -203,7 +204,8 @@ exports.update = function (req, res) {
|
||||
return res.status(422).send({message: 'SERVER.EMAIL_ALREADY_INVITED'});
|
||||
} else {
|
||||
//send invitation mail
|
||||
res.render(path.resolve('modules/invitations/server/templates/invite-sign-up-email'), {
|
||||
var lang = common.getRequestLanguage(req);
|
||||
res.render(path.resolve('modules/invitations/server/templates/invite-sign-up-email-' + lang), {
|
||||
to_email: req.query.to_email,
|
||||
name: req.user.displayName,
|
||||
appName: config.app.title,
|
||||
@@ -303,7 +305,8 @@ exports.sendOfficial = function (req, res) {
|
||||
invitation.isOfficial = true;
|
||||
|
||||
//send invitation mail
|
||||
res.render(path.resolve('modules/invitations/server/templates/invite-sign-up-email'), {
|
||||
var lang = common.getRequestLanguage(req);
|
||||
res.render(path.resolve('modules/invitations/server/templates/invite-sign-up-email-' + lang), {
|
||||
to_email: req.body.email,
|
||||
name: req.user.displayName,
|
||||
appName: config.app.title,
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en" xmlns="http://www.w3.org/1999/xhtml">
|
||||
|
||||
<head>
|
||||
<title></title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<p>Dear {{to_email}},</p>
|
||||
<br />
|
||||
<p>
|
||||
Your friend [{{name}}] invited you to join {{appName}}
|
||||
</p>
|
||||
<p>Please visit this url to register your account:</p>
|
||||
<p>{{url}}</p>
|
||||
<p>Please note: the expiration time of this url is {{hours}} hours, please register as soon as possible</p>
|
||||
<strong>If you didn't make this request, you can ignore this email.</strong>
|
||||
<br />
|
||||
<br />
|
||||
<p>The {{appName}} Support Team</p>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
Reference in New Issue
Block a user