got email pug templates to work
This commit is contained in:
parent
b0f03d1f0a
commit
4f7d646edd
|
@ -9,16 +9,10 @@ var errorHandler = require('../errors.server.controller'),
|
||||||
config = require('../../../config/config'),
|
config = require('../../../config/config'),
|
||||||
User = mongoose.model('User'),
|
User = mongoose.model('User'),
|
||||||
tokgen = require('../../libs/tokenGenerator'),
|
tokgen = require('../../libs/tokenGenerator'),
|
||||||
fs = require('fs');
|
fs = require('fs'),
|
||||||
|
i18n = require('i18n'),
|
||||||
require.extensions['.html'] = function (module, filename) {
|
async = require('async'),
|
||||||
module.exports = fs.readFileSync(filename, 'utf8');
|
pug = require('pug');
|
||||||
};
|
|
||||||
|
|
||||||
var welcomeEmail = require("../../views/welcome.email.view.html");
|
|
||||||
var verificationEmail = require("../../views/verification.email.view.html");
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
var nev = require('email-verification')(mongoose);
|
var nev = require('email-verification')(mongoose);
|
||||||
|
|
||||||
|
@ -26,6 +20,15 @@ var nev = require('email-verification')(mongoose);
|
||||||
var config_nev = function () {
|
var config_nev = function () {
|
||||||
|
|
||||||
nev.configure({
|
nev.configure({
|
||||||
|
|
||||||
|
verifyMailOptions: {
|
||||||
|
from: config.mailer.from
|
||||||
|
},
|
||||||
|
|
||||||
|
confirmMailOptions: {
|
||||||
|
from: config.mailer.from
|
||||||
|
},
|
||||||
|
|
||||||
persistentUserModel: User,
|
persistentUserModel: User,
|
||||||
tempUserCollection: config.tempUserCollection,
|
tempUserCollection: config.tempUserCollection,
|
||||||
emailAndUsernameUnique: true,
|
emailAndUsernameUnique: true,
|
||||||
|
@ -33,19 +36,7 @@ var config_nev = function () {
|
||||||
|
|
||||||
verificationURL: config.baseUrl+'/#!/verify/${URL}',
|
verificationURL: config.baseUrl+'/#!/verify/${URL}',
|
||||||
transportOptions: config.mailer.options,
|
transportOptions: config.mailer.options,
|
||||||
verifyMailOptions: {
|
|
||||||
from: config.mailer.from,
|
|
||||||
subject: '✔ Activate your new TellForm account!',
|
|
||||||
html: verificationEmail,
|
|
||||||
text: 'Please verify your account by clicking the following link, or by copying and pasting it into your browser: ${URL}'
|
|
||||||
},
|
|
||||||
|
|
||||||
confirmMailOptions: {
|
|
||||||
from: config.mailer.from,
|
|
||||||
subject: '✔ Welcome to {{app.title}}!',
|
|
||||||
html: welcomeEmail,
|
|
||||||
text: 'Your account has been successfully verified.'
|
|
||||||
},
|
|
||||||
verifySendMailCallback: function(err, info) {
|
verifySendMailCallback: function(err, info) {
|
||||||
if (err) {
|
if (err) {
|
||||||
throw err;
|
throw err;
|
||||||
|
@ -63,13 +54,22 @@ var config_nev = function () {
|
||||||
throw err;
|
throw err;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
config_nev();
|
config_nev();
|
||||||
|
|
||||||
exports.validateVerificationToken = function(req, res){
|
exports.validateVerificationToken = function(req, res){
|
||||||
nev.confirmTempUser(req.params.token, function(err, user) {
|
|
||||||
|
const fn = pug.compileFile(__dirname + "/../../views/welcome.email.view.pug");
|
||||||
|
var renderedHtml = fn(res.locals);
|
||||||
|
|
||||||
|
var emailTemplate = {
|
||||||
|
subject: i18n.__('WELCOME_EMAIL_SUBJECT', config.app.title),
|
||||||
|
html: renderedHtml,
|
||||||
|
text: i18n.__('WELCOME_EMAIL_TEXT')
|
||||||
|
};
|
||||||
|
|
||||||
|
nev.confirmTempUser(req.params.token, emailTemplate, function(err, user) {
|
||||||
if(err) {
|
if(err) {
|
||||||
return res.status(500).send( {message: err } );
|
return res.status(500).send( {message: err } );
|
||||||
} else if (user){
|
} else if (user){
|
||||||
|
@ -83,7 +83,16 @@ exports.validateVerificationToken = function(req, res){
|
||||||
};
|
};
|
||||||
|
|
||||||
exports.resendVerificationEmail = function(req, res, next){
|
exports.resendVerificationEmail = function(req, res, next){
|
||||||
nev.resendVerificationEmail(req.body.email, function(err, userFound) {
|
const fn = pug.compileFile(__dirname + "/../../views/verification.email.view.pug");
|
||||||
|
var renderedHtml = fn(res.locals);
|
||||||
|
|
||||||
|
var emailTemplate = {
|
||||||
|
subject: i18n.__('VERIFICATION_EMAIL_SUBJECT'),
|
||||||
|
html: renderedHtml,
|
||||||
|
text: i18n.__('VERIFICATION_EMAIL_TEXT')
|
||||||
|
};
|
||||||
|
|
||||||
|
nev.resendVerificationEmail(req.body.email, emailTemplate, function(err, userFound) {
|
||||||
if(err) {
|
if(err) {
|
||||||
return res.status(500).send( {message: errorHandler.getErrorMessage(err) } );
|
return res.status(500).send( {message: errorHandler.getErrorMessage(err) } );
|
||||||
}
|
}
|
||||||
|
@ -112,6 +121,7 @@ exports.signup = function(req, res) {
|
||||||
// Then save the temporary user
|
// Then save the temporary user
|
||||||
nev.createTempUser(user, function (err, existingPersistentUser, newTempUser) {
|
nev.createTempUser(user, function (err, existingPersistentUser, newTempUser) {
|
||||||
if (err) {
|
if (err) {
|
||||||
|
console.log(err);
|
||||||
return res.status(400).send({
|
return res.status(400).send({
|
||||||
message: errorHandler.getErrorMessage(err)
|
message: errorHandler.getErrorMessage(err)
|
||||||
});
|
});
|
||||||
|
@ -120,10 +130,18 @@ exports.signup = function(req, res) {
|
||||||
|
|
||||||
// new user created
|
// new user created
|
||||||
if (newTempUser) {
|
if (newTempUser) {
|
||||||
var URL = newTempUser[nev.options.URLFieldName];
|
const fn = pug.compileFile(__dirname + "/../../views/verification.email.view.pug");
|
||||||
nev.sendVerificationEmail(user.email, URL, function (sendEmailErr, info) {
|
var renderedHtml = fn(res.locals);
|
||||||
if (sendEmailErr) {
|
|
||||||
|
|
||||||
|
var URL = newTempUser[nev.options.URLFieldName];
|
||||||
|
var emailTemplate = {
|
||||||
|
subject: i18n.__('VERIFICATION_EMAIL_SUBJECT'),
|
||||||
|
html: renderedHtml,
|
||||||
|
text: i18n.__('VERIFICATION_EMAIL_TEXT')
|
||||||
|
};
|
||||||
|
|
||||||
|
nev.sendVerificationEmail(user.email, URL, emailTemplate, function (sendEmailErr, info) {
|
||||||
|
if (sendEmailErr) {
|
||||||
return res.status(400).send({
|
return res.status(400).send({
|
||||||
message: errorHandler.getErrorMessage(err)
|
message: errorHandler.getErrorMessage(err)
|
||||||
});
|
});
|
||||||
|
@ -131,7 +149,7 @@ exports.signup = function(req, res) {
|
||||||
return res.status(200).send('An email has been sent to you. Please check it to verify your account.');
|
return res.status(200).send('An email has been sent to you. Please check it to verify your account.');
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
return res.status(400).send({message: 'Error: User already exists!'});
|
return res.status(400).send({message: 'User with username/email already exists!'});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
|
@ -48,7 +48,7 @@ var validateLocalStrategyPassword = function(password) {
|
||||||
* A Validation function for username
|
* A Validation function for username
|
||||||
*/
|
*/
|
||||||
var validateUsername = function(username) {
|
var validateUsername = function(username) {
|
||||||
return (username.match(/^[a-zA-Z0-9]+$/) !== null);
|
return (username.match(/^[a-zA-Z0-9.-_]+$/) !== null);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -70,22 +70,15 @@ var UserSchema = new Schema({
|
||||||
type: String,
|
type: String,
|
||||||
trim: true,
|
trim: true,
|
||||||
unique: 'Account already exists with this email',
|
unique: 'Account already exists with this email',
|
||||||
required: 'Please enter your email',
|
match: [/.+\@.+\..+/, 'Please fill a valid email address'],
|
||||||
validate: {
|
required: [true, 'Email is required']
|
||||||
validator: validateLocalStrategyProperty,
|
|
||||||
message: 'Please fill in your email'
|
|
||||||
},
|
|
||||||
match: [/.+\@.+\..+/, 'Please fill a valid email address']
|
|
||||||
},
|
},
|
||||||
username: {
|
username: {
|
||||||
type: String,
|
type: String,
|
||||||
unique: true,
|
unique: true,
|
||||||
required: true,
|
|
||||||
lowercase: true,
|
lowercase: true,
|
||||||
validate: {
|
match: [/^[a-zA-Z0-9\.\-\_]+$/, 'Username can only contain alphanumeric characters and \'_\', \'-\' and \'.\''],
|
||||||
validator: validateUsername,
|
required: [true, 'Username is required']
|
||||||
message: 'Please use a valid username'
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
passwordHash: {
|
passwordHash: {
|
||||||
type: String,
|
type: String,
|
||||||
|
@ -96,7 +89,6 @@ var UserSchema = new Schema({
|
||||||
},
|
},
|
||||||
provider: {
|
provider: {
|
||||||
type: String,
|
type: String,
|
||||||
required: 'Provider is required',
|
|
||||||
default: 'local'
|
default: 'local'
|
||||||
},
|
},
|
||||||
providerData: {},
|
providerData: {},
|
||||||
|
@ -112,7 +104,6 @@ var UserSchema = new Schema({
|
||||||
type: String,
|
type: String,
|
||||||
enum: ['en', 'fr', 'es', 'it', 'de'],
|
enum: ['en', 'fr', 'es', 'it', 'de'],
|
||||||
default: 'en',
|
default: 'en',
|
||||||
required: 'User must have a language'
|
|
||||||
},
|
},
|
||||||
lastModified: {
|
lastModified: {
|
||||||
type: Date
|
type: Date
|
||||||
|
|
|
@ -5,4 +5,8 @@ block content
|
||||||
div.row.valign
|
div.row.valign
|
||||||
h3.col-md-12.text-center=__('500_HEADER')
|
h3.col-md-12.text-center=__('500_HEADER')
|
||||||
div.col-md-4.col-md-offset-4
|
div.col-md-4.col-md-offset-4
|
||||||
div.col-md-12.text-center(style="padding-bottom: 50px;")=__('500_BODY')
|
if process.env.NODE_ENV == 'development'
|
||||||
|
div.col-md-12.text-center(style="padding-bottom: 50px;")
|
||||||
|
| #{error}
|
||||||
|
else
|
||||||
|
div.col-md-12.text-center(style="padding-bottom: 50px;")=__('500_BODY')
|
|
@ -5,42 +5,45 @@ block content
|
||||||
|
|
||||||
script(src='/static/lib/file-saver.js/FileSaver.js', type='text/javascript')
|
script(src='/static/lib/file-saver.js/FileSaver.js', type='text/javascript')
|
||||||
|
|
||||||
//Embedding The User Object
|
//Embedding The User Object
|
||||||
script(type='text/javascript') var user = null;
|
script(type='text/javascript').
|
||||||
|
var user = null;
|
||||||
|
|
||||||
//Embedding The signupDisabled Boolean
|
//Embedding The signupDisabled Boolean
|
||||||
script(type='text/javascript').
|
script(type='text/javascript').
|
||||||
var signupDisabled = !{signupDisabled};
|
var signupDisabled = !{signupDisabled};
|
||||||
var socketPort = false;
|
var socketPort = false;
|
||||||
var socketUrl = false;
|
var socketUrl = false;
|
||||||
var subdomainsDisabled = !{subdomainsDisabled};
|
var subdomainsDisabled = !{subdomainsDisabled};
|
||||||
|
|
||||||
//Embedding socketPort
|
//Embedding socketPort
|
||||||
if socketPort
|
if socketPort
|
||||||
script(type='text/javascript').
|
script(type='text/javascript').
|
||||||
socketPort = !{socketPort}
|
socketPort = !{socketPort}
|
||||||
|
|
||||||
//Embedding socketUrl
|
//Embedding socketUrl
|
||||||
if socketUrl
|
if socketUrl
|
||||||
script(type='text/javascript').
|
script(type='text/javascript').
|
||||||
socketUrl = !{socketUrl}
|
socketUrl = !{socketUrl}
|
||||||
|
|
||||||
//Socket.io Client Dependency
|
//Socket.io Client Dependency
|
||||||
script(src='https://cdn.socket.io/socket.io-1.4.5.js')
|
script(src='https://cdn.socket.io/socket.io-1.4.5.js')
|
||||||
|
|
||||||
//Bower JS dependencies
|
//Bower JS dependencies
|
||||||
each bowerJSFile in bowerJSFiles
|
each bowerJSFile in bowerJSFiles
|
||||||
script(type='text/javascript', src=bowerJSFile)
|
script(type='text/javascript', src=bowerJSFile)
|
||||||
// end Bower JS dependencies
|
// end Bower JS dependencies
|
||||||
|
|
||||||
script(type='text/javascript', src='https://cdnjs.cloudflare.com/ajax/libs/angular-strap/2.3.8/angular-strap.min.js')
|
script(type='text/javascript', src='https://cdnjs.cloudflare.com/ajax/libs/angular-strap/2.3.8/angular-strap.min.js')
|
||||||
|
|
||||||
//Application JavaScript Files
|
//Application JavaScript Files
|
||||||
each jsFile in jsFiles
|
each jsFile in jsFiles
|
||||||
script(type='text/javascript', src=jsFile)
|
script(type='text/javascript', src=jsFile)
|
||||||
// end Application Javascript dependencies
|
// end Application Javascript dependencies
|
||||||
|
|
||||||
if process.env.NODE_ENV === 'development'
|
if process.env.NODE_ENV === 'development'
|
||||||
script(type='text/javascript', src='http://#{request.hostname}:35729/livereload.js')
|
script(type='text/javascript', src='http://#{request.hostname}:35729/livereload.js')
|
||||||
script(src='https://cdn.ravenjs.com/2.3.0/angular/raven.min.js')
|
|
||||||
script Raven.config('https://825fefd6b4ed4a4da199c1b832ca845c@sentry.tellform.com/2').install();
|
script(src='https://cdn.ravenjs.com/2.3.0/angular/raven.min.js')
|
||||||
|
|
||||||
|
script Raven.config('https://825fefd6b4ed4a4da199c1b832ca845c@sentry.tellform.com/2').install();
|
|
@ -1,65 +0,0 @@
|
||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
|
|
||||||
<head>
|
|
||||||
@import url(//fonts.googleapis.com/css?family=Open+Sans:300,400,600,700&subset=latin,latin-ext);
|
|
||||||
<style>
|
|
||||||
a {
|
|
||||||
color: #007ee6;
|
|
||||||
text-decoration: none;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
<meta content="text/html; charset=utf-8" http-equiv="Content-Type"/>
|
|
||||||
</head>
|
|
||||||
<body style="padding: 0; width: 100% !important; -webkit-text-size-adjust: 100%; margin: 0; -ms-text-size-adjust: 100%;" marginheight="0" marginwidth="0">
|
|
||||||
<center>
|
|
||||||
<table cellpadding="8" cellspacing="0" style="*width: 540px; padding: 0; width: 100% !important; background: #ffffff; margin: 0; background-color: #ffffff;" border="0">
|
|
||||||
<tr>
|
|
||||||
<td valign="top">
|
|
||||||
<table cellpadding="0" cellspacing="0" style="border-radius: 6px; -webkit-border-radius: 6px; border: 1px #c0c0c0 solid; -moz-border-radius: 6px;" border="0" align="center">
|
|
||||||
<tr>
|
|
||||||
<td colspan="3" height="6"></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
<table cellpadding="0" cellspacing="0" style="line-height: 25px;" border="0" align="center">
|
|
||||||
<tr>
|
|
||||||
<td colspan="3" height="30"></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td width="36"></td>
|
|
||||||
<td width="454" align="left" style="color: #444444; border-collapse: collapse; font-size: 11pt; font-family: 'Open Sans', 'Lucida Grande', 'Segoe UI', Arial, Verdana, 'Lucida Sans Unicode', Tahoma, 'Sans Serif'; max-width: 454px;" valign="top">
|
|
||||||
<p>Hello there!</p>
|
|
||||||
<p>Welcome to TellForm! Here is a special link to activate your new account:</p>
|
|
||||||
<p><a href="https://${URL}">Activate my account</a></p>
|
|
||||||
<p>Thanks so much for using our services! If you have any questions, or suggestions, please feel free to email us here at <a href="mailto:team@tellform.com">team@tellform.com</a>.</p>
|
|
||||||
<p> - The TellForm team</p>
|
|
||||||
</td>
|
|
||||||
<td width="36"></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td colspan="3" height="36"></td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
<table cellpadding="0" cellspacing="0" align="center" border="0">
|
|
||||||
<tr>
|
|
||||||
<td height="10"></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td style="padding: 0; border-collapse: collapse;">
|
|
||||||
<table cellpadding="0" cellspacing="0" align="center" border="0">
|
|
||||||
<tr style="color: #c0c0c0; font-size: 11px; font-family: 'Open Sans', 'Lucida Grande', 'Segoe UI', Arial, Verdana, 'Lucida Sans Unicode', Tahoma, 'Sans Serif'; -webkit-text-size-adjust: none;">
|
|
||||||
<td width="400" align="left"></td>
|
|
||||||
<td width="128" align="right">© TellForm 2017</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</center>
|
|
||||||
</body>
|
|
||||||
</head>
|
|
|
@ -1,8 +1,6 @@
|
||||||
doctype html
|
|
||||||
html
|
html
|
||||||
head
|
head
|
||||||
style.
|
style.
|
||||||
@import url(//fonts.googleapis.com/css?family=Open+Sans:300,400,600,700&subset=latin,latin-ext);
|
|
||||||
a {
|
a {
|
||||||
color: #007ee6;
|
color: #007ee6;
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
|
@ -26,11 +24,11 @@ html
|
||||||
td(colspan='3', height='30')
|
td(colspan='3', height='30')
|
||||||
tr
|
tr
|
||||||
td(width='36')
|
td(width='36')
|
||||||
td(width='454', align='left', style='color: #444444; border-collapse: collapse; font-size: 11pt; font-family: 'Open Sans', 'Lucida Grande', 'Segoe UI', Arial, Verdana, 'Lucida Sans Unicode', Tahoma, 'Sans Serif'; max-width: 454px', valign='top')
|
td(width='454', align='left', style="color: #444444; border-collapse: collapse; font-size: 11pt; font-family: 'Open Sans', 'Lucida Grande', 'Segoe UI', Arial, Verdana, 'Lucida Sans Unicode', Tahoma, 'Sans Serif'; max-width: 454px", valign='top')
|
||||||
p=__('EMAIL_GREETING')
|
p=__('EMAIL_GREETING')
|
||||||
p=__('VERIFICATION_EMAIL_PARAGRAPH_1')
|
p=__('VERIFICATION_EMAIL_PARAGRAPH_1')
|
||||||
p
|
p
|
||||||
a(href='https://${URL}')=('VERIFICATION_EMAIL_LINK_TEXT')
|
a(href='https://${URL}')=__('VERIFICATION_EMAIL_LINK_TEXT')
|
||||||
p=__('VERIFICATION_EMAIL_PARAGRAPH_2')
|
p=__('VERIFICATION_EMAIL_PARAGRAPH_2')
|
||||||
a(href='mailto:team@tellform.com')
|
a(href='mailto:team@tellform.com')
|
||||||
| team@tellform.com
|
| team@tellform.com
|
||||||
|
@ -46,6 +44,6 @@ html
|
||||||
td(style='padding: 0; border-collapse: collapse')
|
td(style='padding: 0; border-collapse: collapse')
|
||||||
table(cellpadding='0', cellspacing='0', align='center', border='0')
|
table(cellpadding='0', cellspacing='0', align='center', border='0')
|
||||||
tbody
|
tbody
|
||||||
tr(style='color: #c0c0c0; font-size: 11px; font-family: 'Open Sans', 'Lucida Grande', 'Segoe UI', Arial, Verdana, 'Lucida Sans Unicode', Tahoma, 'Sans Serif'; -webkit-text-size-adjust: none')
|
tr(style="color: #c0c0c0; font-size: 11px; font-family: 'Open Sans', 'Lucida Grande', 'Segoe UI', Arial, Verdana, 'Lucida Sans Unicode', Tahoma, 'Sans Serif'; -webkit-text-size-adjust: none")
|
||||||
td(width='400', align='left')
|
td(width='400', align='left')
|
||||||
td(width='128', align='right') © TellForm 2017
|
td(width='128', align='right') © TellForm 2017
|
||||||
|
|
|
@ -1,64 +0,0 @@
|
||||||
<!DOCTYPE html>
|
|
||||||
<html>
|
|
||||||
<head>@import url(//fonts.googleapis.com/css?family=Open+Sans:300,400,600,700&subset=latin,latin-ext);
|
|
||||||
<style>
|
|
||||||
a {
|
|
||||||
color: #007ee6;
|
|
||||||
text-decoration: none;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
|
|
||||||
</head>
|
|
||||||
<body style="padding: 0; width: 100% !important; -webkit-text-size-adjust: 100%; margin: 0; -ms-text-size-adjust: 100%;" marginheight="0" marginwidth="0">
|
|
||||||
<center>
|
|
||||||
<table cellpadding="8" cellspacing="0" style="*width: 540px; padding: 0; width: 100% !important; background: #ffffff; margin: 0; background-color: #ffffff;" border="0">
|
|
||||||
<tr>
|
|
||||||
<td valign="top">
|
|
||||||
<table cellpadding="0" cellspacing="0" style="border-radius: 6px; -webkit-border-radius: 6px; border: 1px #c0c0c0 solid; -moz-border-radius: 6px;" border="0" align="center">
|
|
||||||
<tr>
|
|
||||||
<td colspan="3" height="6"></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
<table cellpadding="0" cellspacing="0" style="line-height: 25px;" border="0" align="center">
|
|
||||||
<tr>
|
|
||||||
<td colspan="3" height="30"></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td width="36"></td>
|
|
||||||
<td width="454" align="left" style="color: #444444; border-collapse: collapse; font-size: 11pt; font-family: 'Open Sans', 'Lucida Grande', 'Segoe UI', Arial, Verdana, 'Lucida Sans Unicode', Tahoma, 'Sans Serif'; max-width: 454px;" valign="top">
|
|
||||||
<p>Hello there!</p>
|
|
||||||
<p>We would like to welcome you as our newest member!</p>
|
|
||||||
<p>Thanks so much for using TellForm! If you have any questions, or suggestions, please feel free to email us here at <a href="mailto:team@tellform.com">team@tellform.com</a>.</p>
|
|
||||||
<p> - The TellForm team</p>
|
|
||||||
</td>
|
|
||||||
<td width="36"></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td colspan="3" height="36"></td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
<table cellpadding="0" cellspacing="0" align="center" border="0">
|
|
||||||
<tr>
|
|
||||||
<td height="10"></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td style="padding: 0; border-collapse: collapse;">
|
|
||||||
<table cellpadding="0" cellspacing="0" align="center" border="0">
|
|
||||||
<tr style="color: #c0c0c0; font-size: 11px; font-family: 'Open Sans', 'Lucida Grande', 'Segoe UI', Arial, Verdana, 'Lucida Sans Unicode', Tahoma, 'Sans Serif'; -webkit-text-size-adjust: none;">
|
|
||||||
<td width="400" align="left"></td>
|
|
||||||
<td width="128" align="right">© TellForm 2017</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</center>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -1,8 +1,6 @@
|
||||||
doctype html
|
|
||||||
html
|
html
|
||||||
head
|
head
|
||||||
style.
|
style.
|
||||||
@import url(//fonts.googleapis.com/css?family=Open+Sans:300,400,600,700&subset=latin,latin-ext);
|
|
||||||
a {
|
a {
|
||||||
color: #007ee6;
|
color: #007ee6;
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
|
@ -27,7 +25,7 @@ html
|
||||||
td(colspan='3', height='30')
|
td(colspan='3', height='30')
|
||||||
tr
|
tr
|
||||||
td(width='36')
|
td(width='36')
|
||||||
td(width='454', align='left', style='color: #444444; border-collapse: collapse; font-size: 11pt; font-family: 'Open Sans', 'Lucida Grande', 'Segoe UI', Arial, Verdana, 'Lucida Sans Unicode', Tahoma, 'Sans Serif'; max-width: 454px', valign='top')
|
td(width='454', align='left', style="color: #444444; border-collapse: collapse; font-size: 11pt; font-family: 'Open Sans', 'Lucida Grande', 'Segoe UI', Arial, Verdana, 'Lucida Sans Unicode', Tahoma, 'Sans Serif'; max-width: 454px", valign='top')
|
||||||
p=__('EMAIL_GREETING')
|
p=__('EMAIL_GREETING')
|
||||||
p=__('WELCOME_EMAIL_PARAGRAPH_1')
|
p=__('WELCOME_EMAIL_PARAGRAPH_1')
|
||||||
p=__('WELCOME_EMAIL_PARAGRAPH_2')
|
p=__('WELCOME_EMAIL_PARAGRAPH_2')
|
||||||
|
@ -45,6 +43,6 @@ html
|
||||||
td(style='padding: 0; border-collapse: collapse')
|
td(style='padding: 0; border-collapse: collapse')
|
||||||
table(cellpadding='0', cellspacing='0', align='center', border='0')
|
table(cellpadding='0', cellspacing='0', align='center', border='0')
|
||||||
tbody
|
tbody
|
||||||
tr(style='color: #c0c0c0; font-size: 11px; font-family: 'Open Sans', 'Lucida Grande', 'Segoe UI', Arial, Verdana, 'Lucida Sans Unicode', Tahoma, 'Sans Serif'; -webkit-text-size-adjust: none')
|
tr(style="color: #c0c0c0; font-size: 11px; font-family: 'Open Sans', 'Lucida Grande', 'Segoe UI', Arial, Verdana, 'Lucida Sans Unicode', Tahoma, 'Sans Serif'; -webkit-text-size-adjust: none")
|
||||||
td(width='400', align='left')
|
td(width='400', align='left')
|
||||||
td(width='128', align='right') © TellForm 2017
|
td(width='128', align='right') © TellForm 2017
|
||||||
|
|
|
@ -162,8 +162,6 @@ module.exports = function(db) {
|
||||||
app.use(function(req, res, next) {
|
app.use(function(req, res, next) {
|
||||||
// express helper for natively supported engines
|
// express helper for natively supported engines
|
||||||
res.locals.__ = res.__ = function() {
|
res.locals.__ = res.__ = function() {
|
||||||
console.log('\n\n\n\n\n\nres.locals.__');
|
|
||||||
console.log(arguments);
|
|
||||||
return i18n.__.apply(req, arguments);
|
return i18n.__.apply(req, arguments);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,11 @@
|
||||||
"VERIFICATION_EMAIL_PARAGRAPH_1": "Welcome to TellForm! Here is a special link to activate your new account:",
|
"VERIFICATION_EMAIL_PARAGRAPH_1": "Welcome to TellForm! Here is a special link to activate your new account:",
|
||||||
"VERIFICATION_EMAIL_LINK_TEXT": "Activate my account",
|
"VERIFICATION_EMAIL_LINK_TEXT": "Activate my account",
|
||||||
"VERIFICATION_EMAIL_PARAGRAPH_2": "Thanks so much for using our services! If you have any questions, or suggestions, please feel free to email us here at",
|
"VERIFICATION_EMAIL_PARAGRAPH_2": "Thanks so much for using our services! If you have any questions, or suggestions, please feel free to email us here at",
|
||||||
|
"VERIFICATION_EMAIL_SUBJECT": "Activate your new TellForm account!",
|
||||||
|
"VERIFICATION_EMAIL_TEXT": "Please verify your account by clicking the following link, or by copying and pasting it into your browser: ${URL}",
|
||||||
"EMAIL_SIGNATURE": "- The TellForm team",
|
"EMAIL_SIGNATURE": "- The TellForm team",
|
||||||
"WELCOME_EMAIL_PARAGRAPH_1": "We would like to welcome you as our newest member!",
|
"WELCOME_EMAIL_PARAGRAPH_1": "We would like to welcome you as our newest member!",
|
||||||
"WELCOME_EMAIL_PARAGRAPH_2": "We hope you enjoy using TellForm! If you have any trouble please feel free to email us here at"
|
"WELCOME_EMAIL_PARAGRAPH_2": "We hope you enjoy using TellForm! If you have any trouble please feel free to email us here at",
|
||||||
|
"WELCOME_EMAIL_SUBJECT": "Welcome to %s!",
|
||||||
|
"WELCOME_EMAIL_TEXT": "Your account has been successfully verified."
|
||||||
}
|
}
|
|
@ -37,7 +37,7 @@
|
||||||
"cookie-parser": "~1.4.0",
|
"cookie-parser": "~1.4.0",
|
||||||
"deep-diff": "^0.3.4",
|
"deep-diff": "^0.3.4",
|
||||||
"dotenv": "^2.0.0",
|
"dotenv": "^2.0.0",
|
||||||
"email-verification": "~0.4.1",
|
"email-verification": "github:tellform/node-email-verification",
|
||||||
"express": "~4.13.3",
|
"express": "~4.13.3",
|
||||||
"express-session": "~1.12.1",
|
"express-session": "~1.12.1",
|
||||||
"glob": "^7.0.3",
|
"glob": "^7.0.3",
|
||||||
|
@ -52,10 +52,6 @@
|
||||||
"grunt-ng-annotate": "~1.0.1",
|
"grunt-ng-annotate": "~1.0.1",
|
||||||
"helmet": "3.5.0",
|
"helmet": "3.5.0",
|
||||||
"i18n": "^0.8.3",
|
"i18n": "^0.8.3",
|
||||||
"i18n-node": "^2.1.5",
|
|
||||||
"i18n-x": "^0.1.5",
|
|
||||||
"i18next": "^10.0.3",
|
|
||||||
"i18next-express-middleware": "^1.0.7",
|
|
||||||
"jit-grunt": "^0.9.1",
|
"jit-grunt": "^0.9.1",
|
||||||
"lodash": "^4.17.4",
|
"lodash": "^4.17.4",
|
||||||
"main-bower-files": "~2.9.0",
|
"main-bower-files": "~2.9.0",
|
||||||
|
|
Loading…
Reference in a new issue