diff --git a/app/controllers/users/users.authentication.server.controller.js b/app/controllers/users/users.authentication.server.controller.js
index 57a4abbc..1b019721 100755
--- a/app/controllers/users/users.authentication.server.controller.js
+++ b/app/controllers/users/users.authentication.server.controller.js
@@ -8,7 +8,16 @@ var errorHandler = require('../errors.server.controller'),
passport = require('passport'),
config = require('../../../config/config'),
User = mongoose.model('User'),
- tokgen = require('../../libs/tokenGenerator');
+ tokgen = require('../../libs/tokenGenerator'),
+ fs = require('fs');
+
+require.extensions['.html'] = function (module, filename) {
+ module.exports = fs.readFileSync(filename, 'utf8');
+};
+
+var welcomeEmail = require("../../views/welcome.email.view.html");
+var verificationEmail = require("../../views/verification.email.view.html");
+
var nev = require('email-verification')(mongoose);
@@ -26,16 +35,15 @@ var config_nev = function () {
transportOptions: config.mailer.options,
verifyMailOptions: {
from: config.mailer.from,
- subject: 'Confirm your account',
- html: '
Please verify your account by clicking this link. If you are unable to do so, copy and ' +
- 'paste the following link into your browser:
${URL}
',
+ subject: '✔ Activate your new TellForm account!',
+ html: welcomeEmail,
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: 'Account successfully verified!',
- html: 'Your account has been successfully verified.
',
+ subject: '✔ Welcome to {{app.title}}!',
+ html: verificationEmail,
text: 'Your account has been successfully verified.'
},
verifySendMailCallback: function(err, info) {
diff --git a/app/sockets/analytics_service.js b/app/sockets/analytics_service.js
index b4607da1..708f5a3a 100644
--- a/app/sockets/analytics_service.js
+++ b/app/sockets/analytics_service.js
@@ -32,6 +32,14 @@ module.exports = function (io, socket) {
form.analytics.visitors.push(newVisitor);
+ form.save(function (formSaveErr) {
+ if (err) {
+ console.error(err);
+ throw new Error(errorHandler.getErrorMessage(formSaveErr));
+ }
+
+ form.form_fields = form.form_fields.map(v => Object.assign({}, v, { fieldValue: null }));
+
form.save(function (formSaveErr) {
if (err) {
console.error(err);
diff --git a/app/views/templates/reset-password-confirm-email.server.view.html b/app/views/templates/reset-password-confirm-email.server.view.html
index bfbcb157..4654ff1f 100755
--- a/app/views/templates/reset-password-confirm-email.server.view.html
+++ b/app/views/templates/reset-password-confirm-email.server.view.html
@@ -1,13 +1,64 @@
-
-
-
-
- Dear {{name}},
-
- This is a confirmation that the password for your account has just been changed
-
-
- The {{appName}} Support Team
-
-
+
+ @import url(//fonts.googleapis.com/css?family=Open+Sans:300,400,600,700&subset=latin,latin-ext);
+
+
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+ |
+
+
+ |
+
+ Hello there!
+ This is a courtesy message to confirm that your password was just changed.
+ Thanks so much for using our services! If you have any questions, or suggestions, please feel free to email us here at team@tellform.com.
+ - The {{appName}} team
+ |
+ |
+
+
+ |
+
+
+ |
+
+
+
+
+ |
+
+
+
+
+
+ |
+ © TellForm 2017 |
+
+
+ |
+
+
+ |
+
+
+
+
+
\ No newline at end of file
diff --git a/app/views/templates/reset-password-email.server.view.html b/app/views/templates/reset-password-email.server.view.html
index 4869dfd8..98e8beb0 100755
--- a/app/views/templates/reset-password-email.server.view.html
+++ b/app/views/templates/reset-password-email.server.view.html
@@ -1,18 +1,66 @@
-
-
-
-
- Dear {{name}},
-
-
- You have requested to have your password reset for your account at {{appName}}
-
- Please visit this url to reset your password:
- {{url}}
- If you didn't make this request, you can ignore this email.
-
-
- The {{appName}} Support Team
-
-
+
+ @import url(//fonts.googleapis.com/css?family=Open+Sans:300,400,600,700&subset=latin,latin-ext);
+
+
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+ |
+
+
+ |
+
+ Hello there!
+ Here is a special link that will allow you to reset your password. Please note it will expire in one hour for your protection:
+ Reset Your Password
+ If you did not request this, please ignore this email and your password will remain unchanged.
+ Thanks so much for using our services! If you have any questions, or suggestions, please feel free to email us here at team@tellform.com.
+ - The {{appName}} team
+ |
+ |
+
+
+ |
+
+
+ |
+
+
+
+
+ |
+
+
+
+
+
+ |
+ © TellForm 2017 |
+
+
+ |
+
+
+ |
+
+
+
+
+
\ No newline at end of file
diff --git a/app/views/templates/verify-account-email.server.view.html b/app/views/templates/verify-account-email.server.view.html
deleted file mode 100644
index 5611ec4c..00000000
--- a/app/views/templates/verify-account-email.server.view.html
+++ /dev/null
@@ -1,71 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
- |
-
-
-
-
-
- |
-
-
- |
-
- //- -----------------------------------------------------------------------------------
- //- Only Edit Here
- //- -----------------------------------------------------------------------------------
- p Hello {{name}}!
- p
- | Welcome to {{appName}}! Here is a special link to activate your new account:
- p
- a(href='${URL}') Activate my account
- 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:{{contactEmail}}') {{contactEmail}}
- | .
- p - The {{appName}} team
- //- ----------------------------------------------------------------------------------
-
- |
- |
-
-
- |
-
-
- |
-
-
-
- |
-
-
-
-
-
-
-
diff --git a/app/views/verification.email.view.html b/app/views/verification.email.view.html
new file mode 100644
index 00000000..dafdf5a5
--- /dev/null
+++ b/app/views/verification.email.view.html
@@ -0,0 +1,64 @@
+
+
+ @import url(//fonts.googleapis.com/css?family=Open+Sans:300,400,600,700&subset=latin,latin-ext);
+
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+ |
+
+
+ |
+
+ Hello there!
+ Welcome to TellForm! Here is a special link to activate your new account:
+ Activate my account
+ Thanks so much for using our services! If you have any questions, or suggestions, please feel free to email us here at team@tellform.com.
+ - The TellForm team
+ |
+ |
+
+
+ |
+
+
+ |
+
+
+
+
+ |
+
+
+
+
+
+ |
+ © TellForm 2017 |
+
+
+ |
+
+
+ |
+
+
+
+
+
\ No newline at end of file
diff --git a/app/views/welcome.email.view.html b/app/views/welcome.email.view.html
new file mode 100644
index 00000000..2a5a8f16
--- /dev/null
+++ b/app/views/welcome.email.view.html
@@ -0,0 +1,64 @@
+
+
+ @import url(//fonts.googleapis.com/css?family=Open+Sans:300,400,600,700&subset=latin,latin-ext);
+
+
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+ |
+
+
+ |
+
+ Hello there!
+ We would like to welcome you as our newest member!
+ Thanks so much for using TellForm! If you have any questions, or suggestions, please feel free to email us here at team@tellform.com.
+ - The TellForm team
+ |
+ |
+
+
+ |
+
+
+ |
+
+
+
+
+ |
+
+
+
+
+
+ |
+ © TellForm 2017 |
+
+
+ |
+
+
+ |
+
+
+
+
+
\ No newline at end of file
diff --git a/public/modules/forms/base/css/form.css b/public/modules/forms/base/css/form.css
index 5f053a27..5d206d4a 100644
--- a/public/modules/forms/base/css/form.css
+++ b/public/modules/forms/base/css/form.css
@@ -19,6 +19,10 @@ form .btn {
border-width: 0px;
}
+form .btn {
+ border-color: grey;
+}
+
.public-form input.ng-untouched, .public-form textarea.ng-untouched {
border-width: 0 0 2px 0;
border-color: rgba(246, 255, 181, 0.4);