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
0b9ed031
Commit
0b9ed031
authored
Oct 27, 2014
by
AlasdairSwan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ECOM-369 Styled third party auth buttons and cleaned up third party auth messaging
parent
3efeaf5a
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
62 additions
and
11 deletions
+62
-11
lms/static/js/student_account/views/LoginView.js
+5
-2
lms/static/sass/views/_login-register.scss
+51
-0
lms/templates/student_account/login.underscore
+0
-5
lms/templates/student_account/register.underscore
+6
-4
No files found.
lms/static/js/student_account/views/LoginView.js
View file @
0b9ed031
...
@@ -24,6 +24,8 @@ var edx = edx || {};
...
@@ -24,6 +24,8 @@ var edx = edx || {};
preRender
:
function
(
data
)
{
preRender
:
function
(
data
)
{
this
.
providers
=
data
.
thirdPartyAuth
.
providers
||
[];
this
.
providers
=
data
.
thirdPartyAuth
.
providers
||
[];
this
.
currentProvider
=
data
.
thirdPartyAuth
.
currentProvider
||
''
;
this
.
currentProvider
=
data
.
thirdPartyAuth
.
currentProvider
||
''
;
console
.
log
(
data
);
},
},
render
:
function
(
html
)
{
render
:
function
(
html
)
{
...
@@ -64,6 +66,7 @@ var edx = edx || {};
...
@@ -64,6 +66,7 @@ var edx = edx || {};
thirdPartyAuth
:
function
(
event
)
{
thirdPartyAuth
:
function
(
event
)
{
var
providerUrl
=
$
(
event
.
target
).
data
(
'provider-url'
)
||
''
;
var
providerUrl
=
$
(
event
.
target
).
data
(
'provider-url'
)
||
''
;
if
(
providerUrl
)
{
if
(
providerUrl
)
{
window
.
location
.
href
=
providerUrl
;
window
.
location
.
href
=
providerUrl
;
}
else
{
}
else
{
...
@@ -73,8 +76,9 @@ var edx = edx || {};
...
@@ -73,8 +76,9 @@ var edx = edx || {};
},
},
saveError
:
function
(
error
)
{
saveError
:
function
(
error
)
{
console
.
log
(
error
.
status
,
' error: '
,
error
.
responseText
);
//
console.log(error.status, ' error: ', error.responseText);
this
.
errors
=
[
'<li>'
+
error
.
responseText
+
'</li>'
];
this
.
errors
=
[
'<li>'
+
error
.
responseText
+
'</li>'
];
this
.
setErrors
();
/* If we've gotten a 403 error, it means that we've successfully
/* If we've gotten a 403 error, it means that we've successfully
* authenticated with a third-party provider, but we haven't
* authenticated with a third-party provider, but we haven't
...
@@ -89,7 +93,6 @@ var edx = edx || {};
...
@@ -89,7 +93,6 @@ var edx = edx || {};
// TODO -- display the error
// TODO -- display the error
}
}
this
.
setErrors
();
}
}
});
});
...
...
lms/static/sass/views/_login-register.scss
View file @
0b9ed031
...
@@ -220,6 +220,45 @@
...
@@ -220,6 +220,45 @@
text-transform
:
none
;
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 **/
/** Error Container - from _account.scss **/
.status
{
.status
{
@include
box-sizing
(
border-box
);
@include
box-sizing
(
border-box
);
...
@@ -348,5 +387,17 @@
...
@@ -348,5 +387,17 @@
width
:
100px
;
width
:
100px
;
}
}
}
}
.login-provider
{
width
:
calc
(
50%
-
12px
);
&
:nth-child
(
odd
)
{
margin-left
:
10px
;
}
&
:nth-child
(
even
)
{
margin-right
:
10px
;
}
}
}
}
}
}
lms/templates/student_account/login.underscore
View file @
0b9ed031
...
@@ -3,11 +3,6 @@
...
@@ -3,11 +3,6 @@
<h4 class="message-title">We couldn't log you in.</h4>
<h4 class="message-title">We couldn't log you in.</h4>
<ul class="message-copy"></ul>
<ul class="message-copy"></ul>
</div>
</div>
<div class="already-authenticated-msg hidden" aria-hidden="true">
<% if (currentProvider) { %>
<p class="instructions">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.</p>
<% } %>
</div>
<%= fields %>
<%= fields %>
<button class="action action-primary action-update js-login">Log in</button>
<button class="action action-primary action-update js-login">Log in</button>
</form>
</form>
...
...
lms/templates/student_account/register.underscore
View file @
0b9ed031
<% if (currentProvider) { %>
<% if (currentProvider) { %>
<p class="instructions">
<div class="status submission-success" aria-hidden="false">
You've successfully signed in with <strong><%- currentProvider %></strong>.<br />
<h4 class="message-title">You've successfully signed in with <strong><%- currentProvider %></strong>.</h4>
We just need a little more information before you start learning with edX.
<ul class="message-copy">
</p>
<li>We just need a little more information before you start learning with edX.</li>
</ul>
</div>
<% } else {
<% } else {
_.each( providers, function( provider) { %>
_.each( providers, function( provider) { %>
<button type="submit"class="button button-primary button-<%- provider.name %> login-provider" data-provider-url="<%- provider.registerUrl %>">
<button type="submit"class="button button-primary button-<%- provider.name %> login-provider" data-provider-url="<%- provider.registerUrl %>">
...
...
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