Commit fd002344 by Kyle Fiedler

Added new styles for errors and added flash to show the user resubmitted the form

--HG--
branch : kf-login-errors
parent 95e7c2b4
......@@ -4,7 +4,6 @@ ${ error }
<div id="login_div">
<h1>Log in to MITx</h1>
<form id="login_form" method="post">
<div id="login_error"></div>
<ol>
<li>
<label>E-mail*</label>
......
......@@ -122,8 +122,10 @@ $(document).ready(function(){
function(json) {
if(json.success) {
location.href="/courseware";
} else if($('#login_error').length == 0) {
$('#login_form').prepend('<div id="login_error">Email or password is incorrect.</div>');
} else {
$('#login_error').html("Invalid Login");
$('#login_error').stop().css("background-color", "#933").animate({ backgroundColor: "#333"}, 2000);
}
}
);
......
......@@ -65,14 +65,17 @@ div.leanModal_box {
text-align: left;
div#enroll_error, div#login_error, div#pwd_error {
$error-color: #333;
-webkit-font-smoothing: antialiased;
background-color: #F50200;
background-color: $error-color;
border: darken($error-color, 20%);
color: #fff;
text-shadow: 0 1px 0 darken($error-color, 10%);
font-family: "Open sans";
font-weight: bold;
letter-spacing: 1px;
margin-bottom: lh();
padding: lh(.2);
text-transform: uppercase;
margin: (-(lh())) (-(lh())) lh();
padding: lh(.5);
&:empty {
padding: 0;
......
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