From a788db53e90de9475dfa889ee883ac4f04a257e0 Mon Sep 17 00:00:00 2001 From: Victor Shnayder Date: Fri, 14 Sep 2012 14:31:04 -0400 Subject: [PATCH] Show login modal if there's a next param to index, university index * also replace the external-auth-related popping up of the signup form with jquery. Presumably it takes care of the browser specific stuff. --- common/djangoapps/student/views.py | 2 ++ lms/djangoapps/courseware/views.py | 3 +++ lms/templates/index.html | 30 ++++++------------------------ 3 files changed, 11 insertions(+), 24 deletions(-) diff --git a/common/djangoapps/student/views.py b/common/djangoapps/student/views.py index cbb12e44cc..a70349bec3 100644 --- a/common/djangoapps/student/views.py +++ b/common/djangoapps/student/views.py @@ -82,6 +82,8 @@ def index(request, extra_context={}, user=None): domain=domain) context = {'universities': universities, 'entries': entries} context.update(extra_context) + if request.REQUEST.get('next', False): + context['show_login_immediately'] = True return render_to_response('index.html', context) def course_from_id(course_id): diff --git a/lms/djangoapps/courseware/views.py b/lms/djangoapps/courseware/views.py index c474da8d8b..7da5d06741 100644 --- a/lms/djangoapps/courseware/views.py +++ b/lms/djangoapps/courseware/views.py @@ -404,6 +404,9 @@ def university_profile(request, org_id): context = dict(courses=courses, org_id=org_id) template_file = "university_profile/{0}.html".format(org_id).lower() + if request.REQUEST.get('next', False): + context['show_login_immediately'] = True + return render_to_response(template_file, context) def render_notifications(request, course, notifications): diff --git a/lms/templates/index.html b/lms/templates/index.html index 0ee00b57c0..8cabe62f09 100644 --- a/lms/templates/index.html +++ b/lms/templates/index.html @@ -147,28 +147,10 @@ % if show_signup_immediately is not UNDEFINED: -% endif +% elif show_login_immediately is not UNDEFINED: + +% endif \ No newline at end of file