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
f9ab433e
Commit
f9ab433e
authored
Aug 12, 2013
by
Adam Palay
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add settings.PLATFORM_NAME to password_reset_confirm context
parent
18a979bb
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
5 deletions
+26
-5
common/djangoapps/student/views.py
+11
-2
lms/templates/registration/password_reset_confirm.html
+15
-3
No files found.
common/djangoapps/student/views.py
View file @
f9ab433e
...
...
@@ -1037,7 +1037,11 @@ def password_reset(request):
'error'
:
_
(
'Invalid e-mail or user'
)}))
def
password_reset_confirm_wrapper
(
request
,
uidb36
=
None
,
token
=
None
):
def
password_reset_confirm_wrapper
(
request
,
uidb36
=
None
,
token
=
None
,
):
''' A wrapper around django.contrib.auth.views.password_reset_confirm.
Needed because we want to set the user as active at this step.
'''
...
...
@@ -1049,7 +1053,12 @@ def password_reset_confirm_wrapper(request, uidb36=None, token=None):
user
.
save
()
except
(
ValueError
,
User
.
DoesNotExist
):
pass
return
password_reset_confirm
(
request
,
uidb36
=
uidb36
,
token
=
token
)
# we also want to pass settings.PLATFORM_NAME in as extra_context
extra_context
=
{
"platform_name"
:
settings
.
PLATFORM_NAME
}
return
password_reset_confirm
(
request
,
uidb36
=
uidb36
,
token
=
token
,
extra_context
=
extra_context
)
def
reactivation_email_for_user
(
user
):
...
...
lms/templates/registration/password_reset_confirm.html
View file @
f9ab433e
...
...
@@ -5,7 +5,11 @@
<html>
<head>
<title>
{% trans "Reset Your edX Password" %}
</title>
<title>
{% blocktrans with platform_name=platform_name %}
Reset Your {{ platform_name }} Password
{% endblocktrans %}
</title>
{% compressed_css 'application' %}
...
...
@@ -53,7 +57,11 @@
<section
class=
"passwordreset container"
>
<section
class=
"introduction"
>
<header>
<h1>
{% trans "Reset Your edX Password" %}
</h1>
<h1>
{% blocktrans with platform_name=platform_name %}
Reset Your {{ platform_name }} Password
{% endblocktrans %}
</h1>
</header>
</section>
...
...
@@ -66,7 +74,11 @@
<form
role=
"form"
id=
"passwordreset-form"
method=
"post"
data-remote=
"true"
action=
""
>
{% csrf_token %}
<!-- status messages -->
<div
role=
"alert"
class=
"status message"
>
<h3
class=
"message-title"
>
{% trans "We're sorry, edX enrollment is not available in your region" %}
</h3>
<h3
class=
"message-title"
>
{% blocktrans with platform_name=platform_name %}
We're sorry, {{ platform_name }} enrollment is not available in your region
{% endblocktrans %}
</h3>
</div>
<div
role=
"alert"
class=
"status message submission-error"
>
...
...
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