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
fd36c555
Commit
fd36c555
authored
Feb 19, 2013
by
John Jarvis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Renaming login url for modal-less login
parent
bfbd7de0
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
8 deletions
+21
-8
common/djangoapps/student/views.py
+1
-3
lms/templates/login.html
+17
-2
lms/urls.py
+3
-3
No files found.
common/djangoapps/student/views.py
View file @
fd36c555
...
@@ -367,9 +367,7 @@ def change_enrollment(request):
...
@@ -367,9 +367,7 @@ def change_enrollment(request):
@ensure_csrf_cookie
@ensure_csrf_cookie
def
accounts_login
(
request
,
error
=
""
):
def
accounts_login
(
request
,
error
=
""
):
return
render_to_response
(
'login.html'
,
{
'error'
:
error
})
return
render_to_response
(
'accounts_login.html'
,
{
'error'
:
error
})
# Need different levels of logging
# Need different levels of logging
...
...
lms/templates/login.html
View file @
fd36c555
<
%
inherit
file=
"main.html"
/>
<
%
inherit
file=
"main.html"
/>
<
%
namespace
name=
'static'
file=
'static_content.html'
/>
<
%
namespace
name=
'static'
file=
'static_content.html'
/>
<
%!
from
django
.
core
.
urlresolvers
import
reverse
%
>
<
%
block
name=
"title"
><title>
Log into your edX Account
</title></
%
block>
<
%
block
name=
"title"
><title>
Log into your edX Account
</title></
%
block>
<
%
block
name=
"js_extra"
>
<
%
block
name=
"js_extra"
>
...
@@ -28,6 +29,19 @@
...
@@ -28,6 +29,19 @@
});
});
</script>
</script>
<script
type=
"text/javascript"
>
(
function
()
{
$
(
document
).
delegate
(
'#login-form'
,
'ajax:success'
,
function
(
data
,
json
,
xhr
)
{
if
(
json
.
success
)
{
location
.
href
=
"${reverse('dashboard')}"
;
}
});
})(
this
)
</script>
</
%
block>
</
%
block>
<section
class=
"login container"
>
<section
class=
"login container"
>
...
@@ -45,7 +59,7 @@
...
@@ -45,7 +59,7 @@
<h2
class=
"is-hidden"
>
Login Form
</h2>
<h2
class=
"is-hidden"
>
Login Form
</h2>
</header>
</header>
<form
role=
"form"
id=
"login-form"
method=
"post"
data-remote=
"true"
action=
"/login"
>
<form
role=
"form"
id=
"login-form"
method=
"post"
data-remote=
"true"
action=
"/login
_ajax
"
>
<!-- status messages -->
<!-- status messages -->
<div
role=
"alert"
class=
"status message is-hidden"
>
<div
role=
"alert"
class=
"status message is-hidden"
>
...
@@ -117,4 +131,5 @@
...
@@ -117,4 +131,5 @@
<p>
Looking for help in logging in or with your edX account?
<a
href=
"#"
>
View our help section for answers to commonly asked questions
</a></p>
<p>
Looking for help in logging in or with your edX account?
<a
href=
"#"
>
View our help section for answers to commonly asked questions
</a></p>
</div>
</div>
</aside>
</aside>
</section>
</section>
lms/urls.py
View file @
fd36c555
...
@@ -15,7 +15,7 @@ urlpatterns = ('',
...
@@ -15,7 +15,7 @@ urlpatterns = ('',
url
(
r'^update_certificate$'
,
'certificates.views.update_certificate'
),
url
(
r'^update_certificate$'
,
'certificates.views.update_certificate'
),
url
(
r'^$'
,
'branding.views.index'
,
name
=
"root"
),
# Main marketing page, or redirect to courseware
url
(
r'^$'
,
'branding.views.index'
,
name
=
"root"
),
# Main marketing page, or redirect to courseware
url
(
r'^dashboard$'
,
'student.views.dashboard'
,
name
=
"dashboard"
),
url
(
r'^dashboard$'
,
'student.views.dashboard'
,
name
=
"dashboard"
),
url
(
r'^
sign
in$'
,
'student.views.signin_user'
,
name
=
"signin_user"
),
url
(
r'^
log
in$'
,
'student.views.signin_user'
,
name
=
"signin_user"
),
url
(
r'^register$'
,
'student.views.register_user'
,
name
=
"register_user"
),
url
(
r'^register$'
,
'student.views.register_user'
,
name
=
"register_user"
),
url
(
r'^admin_dashboard$'
,
'dashboard.views.dashboard'
),
url
(
r'^admin_dashboard$'
,
'dashboard.views.dashboard'
),
...
@@ -41,8 +41,8 @@ urlpatterns = ('',
...
@@ -41,8 +41,8 @@ urlpatterns = ('',
url
(
r'^accounts/login$'
,
'student.views.accounts_login'
,
name
=
"accounts_login"
),
url
(
r'^accounts/login$'
,
'student.views.accounts_login'
,
name
=
"accounts_login"
),
url
(
r'^login$'
,
'student.views.login_user'
,
name
=
"login"
),
url
(
r'^login
_ajax
$'
,
'student.views.login_user'
,
name
=
"login"
),
url
(
r'^login/(?P<error>[^/]*)$'
,
'student.views.login_user'
),
url
(
r'^login
_ajax
/(?P<error>[^/]*)$'
,
'student.views.login_user'
),
url
(
r'^logout$'
,
'student.views.logout_user'
,
name
=
'logout'
),
url
(
r'^logout$'
,
'student.views.logout_user'
,
name
=
'logout'
),
url
(
r'^create_account$'
,
'student.views.create_account'
),
url
(
r'^create_account$'
,
'student.views.create_account'
),
url
(
r'^activate/(?P<key>[^/]*)$'
,
'student.views.activate_account'
,
name
=
"activate"
),
url
(
r'^activate/(?P<key>[^/]*)$'
,
'student.views.activate_account'
,
name
=
"activate"
),
...
...
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