Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
edx-platform
Commits
b8aff26c
Commit
b8aff26c
authored
Oct 01, 2013
by
Julia Hansbrough
Committed by
Brian Wilson
Oct 16, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Merged in email confirmation modal
parent
3f88b879
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
15 deletions
+25
-15
lms/static/coffee/src/instructor_dashboard/send_email.coffee
+25
-15
No files found.
lms/static/coffee/src/instructor_dashboard/send_email.coffee
View file @
b8aff26c
...
@@ -23,21 +23,31 @@ class SendEmail
...
@@ -23,21 +23,31 @@ class SendEmail
@
$btn_send
.
click
=>
@
$btn_send
.
click
=>
success_message
=
gettext
(
'Your email was successfully queued for sending.'
)
if
@
$subject
.
val
()
==
""
alert
gettext
(
"Your message must have a subject."
)
send_data
=
else
if
@
$emailEditor
.
save
()[
'data'
]
==
""
action
:
'send'
alert
gettext
(
"Your message cannot be blank."
)
send_to
:
@
$send_to
.
val
()
else
subject
:
@
$subject
.
val
()
send_to
=
@
$send_to
.
val
().
toLowerCase
()
message
:
@
$emailEditor
.
save
()[
'data'
]
if
send_to
==
"myself"
send_to
=
gettext
(
"yourself"
)
$
.
ajax
subject
=
gettext
(
@
$subject
.
val
())
type
:
'POST'
confirm_message
=
gettext
(
"You are about to send an email titled
\"
#{
subject
}
\"
to
#{
send_to
}
. Is this OK?"
)
dataType
:
'json'
if
confirm
confirm_message
url
:
@
$btn_send
.
data
'endpoint'
data
:
send_data
send_data
=
success
:
(
data
)
=>
@
display_response
(
"<div class=
\"
msg msg-confirm
\"
><p class=
\"
copy
\"
>"
+
success_message
+
"</p></div>"
)
action
:
'send'
error
:
std_ajax_err
=>
@
fail_with_error
gettext
(
'Error sending email.'
)
send_to
:
@
$send_to
.
val
()
subject
:
@
$subject
.
val
()
message
:
@
$emailEditor
.
save
()[
'data'
]
$
.
ajax
type
:
'POST'
dataType
:
'json'
url
:
@
$btn_send
.
data
'endpoint'
data
:
send_data
success
:
(
data
)
=>
@
display_response
gettext
(
'Your email was successfully queued for sending.'
)
error
:
std_ajax_err
=>
@
fail_with_error
gettext
(
'Error sending email.'
)
fail_with_error
:
(
msg
)
->
fail_with_error
:
(
msg
)
->
console
.
warn
msg
console
.
warn
msg
...
...
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