diff --git a/lms/static/js/student_account/views/LoginView.js b/lms/static/js/student_account/views/LoginView.js
index d210baac6d..025e2c2c73 100644
--- a/lms/static/js/student_account/views/LoginView.js
+++ b/lms/static/js/student_account/views/LoginView.js
@@ -24,6 +24,8 @@ var edx = edx || {};
preRender: function( data ) {
this.providers = data.thirdPartyAuth.providers || [];
this.currentProvider = data.thirdPartyAuth.currentProvider || '';
+
+ console.log(data);
},
render: function( html ) {
@@ -64,6 +66,7 @@ var edx = edx || {};
thirdPartyAuth: function( event ) {
var providerUrl = $(event.target).data('provider-url') || '';
+
if (providerUrl) {
window.location.href = providerUrl;
} else {
@@ -73,8 +76,9 @@ var edx = edx || {};
},
saveError: function( error ) {
- console.log(error.status, ' error: ', error.responseText);
+ // console.log(error.status, ' error: ', error.responseText);
this.errors = ['
' + error.responseText + ' '];
+ this.setErrors();
/* If we've gotten a 403 error, it means that we've successfully
* authenticated with a third-party provider, but we haven't
@@ -89,7 +93,6 @@ var edx = edx || {};
// TODO -- display the error
}
- this.setErrors();
}
});
diff --git a/lms/static/sass/views/_login-register.scss b/lms/static/sass/views/_login-register.scss
index 0abce46cca..a31adea179 100644
--- a/lms/static/sass/views/_login-register.scss
+++ b/lms/static/sass/views/_login-register.scss
@@ -220,6 +220,45 @@
text-transform: none;
}
+ .login-provider {
+ @extend %btn-secondary-blue-outline;
+ width: 100%;
+ margin-top: 20px;
+
+ .icon {
+ color: inherit;
+ margin-right: $baseline/2;
+ }
+
+ &.button-Google:hover, &.button-Google:focus {
+ background-color: #dd4b39;
+ border: 1px solid #A5382B;
+ }
+
+ &.button-Google:hover {
+ box-shadow: 0 2px 1px 0 #8D3024;
+ }
+
+ &.button-Facebook:hover, &.button-Facebook:focus {
+ background-color: #3b5998;
+ border: 1px solid #263A62;
+ }
+
+ &.button-Facebook:hover {
+ box-shadow: 0 2px 1px 0 #30487C;
+ }
+
+ &.button-LinkedIn:hover , &.button-LinkedIn:focus {
+ background-color: #0077b5;
+ border: 1px solid #06527D;
+ }
+
+ &.button-LinkedIn:hover {
+ box-shadow: 0 2px 1px 0 #005D8E;
+ }
+
+ }
+
/** Error Container - from _account.scss **/
.status {
@include box-sizing(border-box);
@@ -348,5 +387,17 @@
width: 100px;
}
}
+
+ .login-provider {
+ width: calc( 50% - 12px );
+
+ &:nth-child(odd) {
+ margin-left: 10px;
+ }
+
+ &:nth-child(even) {
+ margin-right: 10px;
+ }
+ }
}
}
diff --git a/lms/templates/student_account/login.underscore b/lms/templates/student_account/login.underscore
index 456c8c9982..d26aa1a15b 100644
--- a/lms/templates/student_account/login.underscore
+++ b/lms/templates/student_account/login.underscore
@@ -3,11 +3,6 @@
We couldn't log you in.
-
- <% if (currentProvider) { %>
-
You've successfully logged into <%- currentProvider %>, but you need to link your account. Please click "I am a returning user" to create an EdX account.
- <% } %>
-
<%= fields %>
Log in
diff --git a/lms/templates/student_account/register.underscore b/lms/templates/student_account/register.underscore
index 198f4c8acf..3227e55194 100644
--- a/lms/templates/student_account/register.underscore
+++ b/lms/templates/student_account/register.underscore
@@ -1,8 +1,10 @@
<% if (currentProvider) { %>
-
- You've successfully signed in with <%- currentProvider %> .
- We just need a little more information before you start learning with edX.
-
+
+
You've successfully signed in with <%- currentProvider %> .
+
+ We just need a little more information before you start learning with edX.
+
+
<% } else {
_.each( providers, function( provider) { %>