Commit 0eef7a90 by dcadams Committed by Jason Bau

Registration page for Stanford CME

New app cme_registration
New table cme_registration
parent 537d128c
...@@ -150,3 +150,6 @@ MITX_FEATURES['ENABLE_SERVICE_STATUS'] = True ...@@ -150,3 +150,6 @@ MITX_FEATURES['ENABLE_SERVICE_STATUS'] = True
# This is to disable a test under the common directory that will not pass when run under CMS # This is to disable a test under the common directory that will not pass when run under CMS
MITX_FEATURES['DISABLE_PASSWORD_RESET_EMAIL_TEST'] = True MITX_FEATURES['DISABLE_PASSWORD_RESET_EMAIL_TEST'] = True
# This is to disable tests CME Registration tests, under common, that will not pass when run under CMS
MITX_FEATURES['DISABLE_CME_REGISTRATION_TESTS'] = True
...@@ -55,7 +55,7 @@ from courseware.access import has_access ...@@ -55,7 +55,7 @@ from courseware.access import has_access
from external_auth.models import ExternalAuthMap from external_auth.models import ExternalAuthMap
from bulk_email.models import Optout from bulk_email.models import Optout
from cme_registration.views import cme_register_user, cme_create_account
import track.views import track.views
from statsd import statsd from statsd import statsd
...@@ -242,6 +242,9 @@ def register_user(request, extra_context=None): ...@@ -242,6 +242,9 @@ def register_user(request, extra_context=None):
""" """
This view will display the non-modal registration form This view will display the non-modal registration form
""" """
if settings.MITX_FEATURES.get('USE_CME_REGISTRATION'):
return cme_register_user(request, extra_context=extra_context)
if request.user.is_authenticated(): if request.user.is_authenticated():
return redirect(reverse('dashboard')) return redirect(reverse('dashboard'))
...@@ -585,6 +588,9 @@ def create_account(request, post_override=None): ...@@ -585,6 +588,9 @@ def create_account(request, post_override=None):
JSON call to create new edX account. JSON call to create new edX account.
Used by form in signup_modal.html, which is included into navigation.html Used by form in signup_modal.html, which is included into navigation.html
''' '''
if settings.MITX_FEATURES.get('USE_CME_REGISTRATION'):
return cme_create_account(request, post_override=post_override)
js = {'success': False} js = {'success': False}
post_vars = post_override if post_override else request.POST post_vars = post_override if post_override else request.POST
......
...@@ -48,6 +48,9 @@ class LoginEnrollmentTestCase(TestCase): ...@@ -48,6 +48,9 @@ class LoginEnrollmentTestCase(TestCase):
Provides support for user creation, Provides support for user creation,
activation, login, and course enrollment. activation, login, and course enrollment.
""" """
def setUp(self):
from django.conf import settings
def setup_user(self): def setup_user(self):
""" """
Create a user account, activate, and log in. Create a user account, activate, and log in.
......
...@@ -161,7 +161,10 @@ MITX_FEATURES = { ...@@ -161,7 +161,10 @@ MITX_FEATURES = {
'ENABLE_CHAT': False, 'ENABLE_CHAT': False,
# Toggle the availability of the shopping cart page # Toggle the availability of the shopping cart page
'ENABLE_SHOPPING_CART': False 'ENABLE_SHOPPING_CART': False,
#Toggle using CME registration instead of normal
'USE_CME_REGISTRATION': False
} }
# Used for A/B testing # Used for A/B testing
...@@ -810,7 +813,10 @@ INSTALLED_APPS = ( ...@@ -810,7 +813,10 @@ INSTALLED_APPS = (
'notification_prefs', 'notification_prefs',
# Different Course Modes # Different Course Modes
'course_modes' 'course_modes',
# CME Registration
'cme_registration',
) )
######################### MARKETING SITE ############################### ######################### MARKETING SITE ###############################
......
...@@ -211,11 +211,11 @@ ...@@ -211,11 +211,11 @@
fieldset { fieldset {
margin: 0; margin: 0;
padding-top: 0; padding-top: 0;
padding-bottom: $baseline; padding-bottom: $baseline*2;
} }
.list-input { .list-input {
margin: 0; margin: 0 0 0 25px;
padding: 0; padding: 0;
list-style: none; list-style: none;
} }
...@@ -305,9 +305,9 @@ ...@@ -305,9 +305,9 @@
} }
// types - checkboxes/radio buttons // types - checkboxes/radio buttons
&.checkbox { &.checkbox, .radio {
input[type="checkbox"] { input[type="checkbox"], input[type="radio"] {
display: inline-block; display: inline-block;
width: auto; width: auto;
margin-right: ($baseline/4); margin-right: ($baseline/4);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment