added white lable name
This commit is contained in:
@@ -11,7 +11,7 @@ var Mail = {};
|
|||||||
Mail.send = async function(to, subject, message, from){
|
Mail.send = async function(to, subject, message, from){
|
||||||
await sgMail.send({
|
await sgMail.send({
|
||||||
to: to,
|
to: to,
|
||||||
from: from || 'Theta 42 Accounts <accounts@no-reply.theta42.com>',
|
from: from || `${conf.name} Accounts <accounts@no-reply.theta42.com>`,
|
||||||
subject: subject,
|
subject: subject,
|
||||||
text: message,
|
text: message,
|
||||||
html: message,
|
html: message,
|
||||||
@@ -20,6 +20,7 @@ Mail.send = async function(to, subject, message, from){
|
|||||||
|
|
||||||
|
|
||||||
Mail.sendTemplate = async function(to, template, context, from){
|
Mail.sendTemplate = async function(to, template, context, from){
|
||||||
|
context.name = conf.name;
|
||||||
template = require(`../views/email_templates/${template}`);
|
template = require(`../views/email_templates/${template}`);
|
||||||
await Mail.send(
|
await Mail.send(
|
||||||
to,
|
to,
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
module.exports = {
|
module.exports = {
|
||||||
subject: 'Password reset for Theta 42 account',
|
subject: 'Password reset for {{ name }} account',
|
||||||
message: `
|
message: `
|
||||||
<h2> Theta 42 account</h2>
|
<h2> {{ name }} account</h2>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
Hello {{ user.givenName }},
|
Hello {{ user.givenName }},
|
||||||
@@ -19,7 +19,7 @@ module.exports = {
|
|||||||
|
|
||||||
</p>
|
</p>
|
||||||
Thank you,<br />
|
Thank you,<br />
|
||||||
Theta 42
|
{{ name }}
|
||||||
</p>
|
</p>
|
||||||
`
|
`
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
module.exports = {
|
module.exports = {
|
||||||
subject: 'Validate email for Theta 42 account',
|
subject: 'Validate email for {{ name }} account',
|
||||||
message: `
|
message: `
|
||||||
<h2> Theta 42 account</h2>
|
<h2> {{ name }} account</h2>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
Welcome,
|
Welcome,
|
||||||
@@ -18,7 +18,7 @@ module.exports = {
|
|||||||
|
|
||||||
</p>
|
</p>
|
||||||
Thank you,<br />
|
Thank you,<br />
|
||||||
Theta 42
|
{{ name }}
|
||||||
</p>
|
</p>
|
||||||
`
|
`
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,12 +1,12 @@
|
|||||||
module.exports = {
|
module.exports = {
|
||||||
subject: 'Welcome to Theta 42!',
|
subject: 'Welcome to {{ name }}!',
|
||||||
message: `
|
message: `
|
||||||
<p>
|
<p>
|
||||||
Welcome {{user.givenName}},
|
Welcome {{user.givenName}},
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
Your new Theta 42 Single sign-on account is ready to use. Here is some
|
Your new {{ name }} Single sign-on account is ready to use. Here is some
|
||||||
information to get you started.
|
information to get you started.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
@@ -19,7 +19,7 @@ module.exports = {
|
|||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
You account is ready to be used now, test it by SSHing into the Theta 42
|
You account is ready to be used now, test it by SSHing into the {{ name }}
|
||||||
jump host \`ssh {{user.uid}}@718it.biz\`
|
jump host \`ssh {{user.uid}}@718it.biz\`
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
@@ -28,7 +28,7 @@ module.exports = {
|
|||||||
You will be notified of new features and services as they become available.
|
You will be notified of new features and services as they become available.
|
||||||
</p>
|
</p>
|
||||||
Thank you,<br />
|
Thank you,<br />
|
||||||
Theta 42
|
{{ name }}
|
||||||
</p>
|
</p>
|
||||||
`
|
`
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
||||||
<title>SSO Manager - Theta 42</title>
|
<title>SSO Manager - <%= name %></title>
|
||||||
<!-- CSS are placed here -->
|
<!-- CSS are placed here -->
|
||||||
<link rel="stylesheet" href="/static/css/bootstrap-4.4.1.min.css">
|
<link rel="stylesheet" href="/static/css/bootstrap-4.4.1.min.css">
|
||||||
<link rel='stylesheet' href='/static/css/styles.css' />
|
<link rel='stylesheet' href='/static/css/styles.css' />
|
||||||
@@ -13,9 +13,10 @@
|
|||||||
<script type="text/javascript" src="/static/js/bootstrap-4.4.1.min.js"></script>
|
<script type="text/javascript" src="/static/js/bootstrap-4.4.1.min.js"></script>
|
||||||
<script type="text/javascript" src="/static/js/all.min.js"></script>
|
<script type="text/javascript" src="/static/js/all.min.js"></script>
|
||||||
<script type="text/javascript" src='/static/js/mustache.min.js'></script>
|
<script type="text/javascript" src='/static/js/mustache.min.js'></script>
|
||||||
<script type="text/javascript" src="/static/js/app.js"></script>
|
|
||||||
<script type="text/javascript" src="/static/js/val.js"></script>
|
<script type="text/javascript" src="/static/js/val.js"></script>
|
||||||
<script type="text/javascript" src="/static/js/moment.js"></script>
|
<script type="text/javascript" src="/static/js/moment.js"></script>
|
||||||
|
<script type="text/javascript" src="/static/js/jq-repeat.js"></script>
|
||||||
|
<script type="text/javascript" src="/static/js/app.js"></script>
|
||||||
|
|
||||||
|
|
||||||
<!-- HTML5 shim, for IE6-8 support of HTML5 elements -->
|
<!-- HTML5 shim, for IE6-8 support of HTML5 elements -->
|
||||||
@@ -25,7 +26,7 @@
|
|||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<header class="shadow d-flex flex-column flex-md-row align-items-center p-3 px-md-4 mb-3 bg-white border-bottom shadow-sm">
|
<header class="shadow d-flex flex-column flex-md-row align-items-center p-3 px-md-4 mb-3 bg-white border-bottom shadow-sm">
|
||||||
<h5 class="hover-effect my-0 mr-md-auto font-weight-normal">SSO Manager - Theta 42</h5>
|
<h5 class="hover-effect my-0 mr-md-auto font-weight-normal">SSO Manager - <%= name %></h5>
|
||||||
<nav class="my-2 my-md-0 mr-md-3">
|
<nav class="my-2 my-md-0 mr-md-3">
|
||||||
<a class="text-dark hover-effect" href="/"><i class="fad fa-tachometer-alt-fastest"></i>Home</a>
|
<a class="text-dark hover-effect" href="/"><i class="fad fa-tachometer-alt-fastest"></i>Home</a>
|
||||||
<a class="text-dark hover-effect" href="/users"><i class="fad fa-users"></i>Users</a>
|
<a class="text-dark hover-effect" href="/users"><i class="fad fa-users"></i>Users</a>
|
||||||
|
|||||||
Reference in New Issue
Block a user