diff --git a/lms/envs/common.py b/lms/envs/common.py index be752beebe..361fd541ce 100644 --- a/lms/envs/common.py +++ b/lms/envs/common.py @@ -286,7 +286,7 @@ FEATURES = { 'ENABLE_VIDEO_ABSTRACTION_LAYER_API': False, # Enable the new dashboard, account, and profile pages - 'ENABLE_NEW_DASHBOARD': False, + 'ENABLE_NEW_DASHBOARD': True, } # Ignore static asset files on import which match this pattern diff --git a/lms/static/js/student_account/models/PasswordResetModel.js b/lms/static/js/student_account/models/PasswordResetModel.js index 79a3191dcc..c62d83c1be 100644 --- a/lms/static/js/student_account/models/PasswordResetModel.js +++ b/lms/static/js/student_account/models/PasswordResetModel.js @@ -12,7 +12,7 @@ var edx = edx || {}; email: '' }, - urlRoot: '/resetMe', + urlRoot: '/account/password', sync: function(method, model) { var headers = { @@ -27,9 +27,6 @@ var edx = edx || {}; headers: headers }) .done(function() { - var query = window.location.search, - url = '/dashboard'; - model.trigger('success'); }) .fail( function( error ) { diff --git a/lms/static/js/student_account/views/AccessView.js b/lms/static/js/student_account/views/AccessView.js index 363bc9f6f3..fb0e61df8c 100644 --- a/lms/static/js/student_account/views/AccessView.js +++ b/lms/static/js/student_account/views/AccessView.js @@ -57,22 +57,10 @@ var edx = edx || {}; this.subview.register = new edx.student.account.RegisterView(); } else if ( type === 'reset' ) { this.subview.passwordHelp = new edx.student.account.PasswordResetView(); - - // Listen for 'password-reset' event to toggle sub-views - this.listenTo( this.subview.passwordHelp, 'password-reset', this.removePasswordView); } }, - removePasswordView: function() { - this.$header.removeClass('hidden'); - $(this.el).find('.form-type').removeClass('hidden'); - - // User should only have to submit reset once so remove view - this.subview.passwordHelp.remove(); - }, - resetPassword: function() { - console.log( this.$header ); this.$header.addClass('hidden'); $(this.el).find('.form-type').addClass('hidden'); this.loadForm('reset'); @@ -90,15 +78,6 @@ var edx = edx || {}; $form.removeClass('hidden'); }, - getModel: function( type ) { - var models = { - join: app.JoinModel, - login: app.JoinModel - }; - - return models[type] ? new models[type]() : false; - }, - form: { isLoaded: function( $form ) { return $form.html().length > 0; diff --git a/lms/static/js/student_account/views/LoginView.js b/lms/static/js/student_account/views/LoginView.js index dda774c9a3..20d3298087 100644 --- a/lms/static/js/student_account/views/LoginView.js +++ b/lms/static/js/student_account/views/LoginView.js @@ -24,7 +24,7 @@ var edx = edx || {}; $form: {}, - initialize: function( obj ) { + initialize: function() { this.getInitialData(); }, @@ -66,7 +66,7 @@ var edx = edx || {}; }); }, - initModel: function( url, method ) { + initModel: function( url ) { this.model = new edx.student.account.LoginModel({ url: url }); diff --git a/lms/static/js/student_account/views/PasswordResetView.js b/lms/static/js/student_account/views/PasswordResetView.js index 5e387ab5f5..3391ef718a 100644 --- a/lms/static/js/student_account/views/PasswordResetView.js +++ b/lms/static/js/student_account/views/PasswordResetView.js @@ -25,7 +25,7 @@ var edx = edx || {}; $form: {}, - initialize: function( obj ) { + initialize: function() { var fields = this.buildForm([{ label: 'E-mail', instructions: 'This is the e-mail address you used to register with edX', @@ -34,7 +34,7 @@ var edx = edx || {}; type: 'email', restrictions: [] }]); -console.log('PasswordResetView INIT'); + this.initModel(); this.render( fields ); }, @@ -61,13 +61,12 @@ console.log('PasswordResetView INIT'); this.listenTo( this.model, 'success', this.resetComplete) ; }, - initModel: function( url, method ) { - console.log('init the password reset model'); - /*this.model = new edx.student.account.PasswordResetModel(); + initModel: function() { + this.model = new edx.student.account.PasswordResetModel(); this.listenTo( this.model, 'error', function( error ) { console.log(error.status, ' error: ', error.responseText); - });*/ + }); }, buildForm: function( data ) { @@ -75,14 +74,14 @@ console.log('PasswordResetView INIT'); i, len = data.length, fieldTpl = this.fieldTpl; -console.log('buildForm ', data); + for ( i=0; i - + + + + \ No newline at end of file diff --git a/lms/templates/student_account/register.underscore b/lms/templates/student_account/register.underscore index dc620f790f..874d72530d 100644 --- a/lms/templates/student_account/register.underscore +++ b/lms/templates/student_account/register.underscore @@ -1,4 +1,4 @@ -
+