Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
yotta
/
pictogram
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
60
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
fee2b0c7
authored
Aug 14, 2017
by
Arturo Montejo Ráez
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
fixing issue with mail subject localization
parent
0e6cd7c4
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
1 deletions
sails/src/api/controllers/StudentController.js
sails/src/api/controllers/SupervisorController.js
sails/src/api/controllers/StudentController.js
View file @
fee2b0c7
...
@@ -499,11 +499,18 @@ module.exports = {
...
@@ -499,11 +499,18 @@ module.exports = {
surname
:
student
.
surname
,
surname
:
student
.
surname
,
license
:
License
.
hyphenize
(
student
.
license
.
number
)
license
:
License
.
hyphenize
(
student
.
license
.
number
)
});
});
var
subject
=
sails
.
__
({
phrase
:
'notification_from_pictogram'
,
locale
:
params
.
lang
||
'es-es'
});
console
.
log
(
"-->"
+
message
);
console
.
log
(
"-->"
+
message
);
mailService
.
mailer
()
mailService
.
mailer
()
.
send
({
.
send
({
to
:
supervisor
.
email
,
to
:
supervisor
.
email
,
text
:
message
text
:
message
,
subject
:
subject
})
})
.
then
(()
=>
{})
.
then
(()
=>
{})
.
catch
((
err
)
=>
{});
.
catch
((
err
)
=>
{});
...
...
sails/src/api/controllers/SupervisorController.js
View file @
fee2b0c7
...
@@ -284,12 +284,17 @@ module.exports = {
...
@@ -284,12 +284,17 @@ module.exports = {
locale
:
params
.
lang
||
'es-es'
locale
:
params
.
lang
||
'es-es'
})
+
'https://'
+
req
.
headers
.
host
+
'/sup/activate/'
+
token
;
// expires in 1 week
})
+
'https://'
+
req
.
headers
.
host
+
'/sup/activate/'
+
token
;
// expires in 1 week
var
subject
=
sails
.
__
({
phrase
:
'notification_from_pictogram'
,
locale
:
params
.
lang
||
'es-es'
});
sails
.
log
.
debug
(
"Sending activation email: \n"
+
message
);
sails
.
log
.
debug
(
"Sending activation email: \n"
+
message
);
mailService
.
mailer
()
mailService
.
mailer
()
.
send
({
.
send
({
to
:
params
.
email
,
to
:
params
.
email
,
subject
:
subject
,
text
:
message
text
:
message
})
})
.
then
(()
=>
{
cb
();})
.
then
(()
=>
{
cb
();})
...
@@ -343,9 +348,15 @@ module.exports = {
...
@@ -343,9 +348,15 @@ module.exports = {
})
+
'https://'
+
req
.
headers
.
host
+
'/app/#/changepass/'
+
sailsTokenAuth
.
issueToken
(
sup
.
id
,
60
);
// expires in 1 hour
})
+
'https://'
+
req
.
headers
.
host
+
'/app/#/changepass/'
+
sailsTokenAuth
.
issueToken
(
sup
.
id
,
60
);
// expires in 1 hour
sails
.
log
.
debug
(
"Sending request email: \n"
+
message
);
sails
.
log
.
debug
(
"Sending request email: \n"
+
message
);
var
subject
=
sails
.
__
({
phrase
:
'notification_from_pictogram'
,
locale
:
params
.
lang
||
'es-es'
});
mailService
.
mailer
()
mailService
.
mailer
()
.
send
({
.
send
({
to
:
params
.
email
,
to
:
params
.
email
,
subject
:
subject
,
text
:
message
text
:
message
})
})
.
then
(()
=>
{
.
then
(()
=>
{
...
@@ -567,6 +578,10 @@ module.exports = {
...
@@ -567,6 +578,10 @@ module.exports = {
mailService
.
mailer
()
mailService
.
mailer
()
.
send
({
.
send
({
to
:
sup
.
email
,
to
:
sup
.
email
,
subject
:
sails
.
__
({
phrase
:
'notification_from_pictogram'
,
locale
:
params
.
lang
||
'es-es'
}),
text
:
sails
.
__
({
text
:
sails
.
__
({
phrase
:
'office_link'
,
phrase
:
'office_link'
,
locale
:
sup
.
lang
||
'es-es'
locale
:
sup
.
lang
||
'es-es'
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment