From 1c027c43d23f47004cbc1bd7841b6124d129a757 Mon Sep 17 00:00:00 2001 From: Galen Frechette Date: Mon, 16 Jul 2012 10:27:55 -0400 Subject: [PATCH] hooks up links from login modal to signup modal and signup modal to login modal --- lms/static/js/toggle_login_modal.js | 2 ++ lms/static/sass/application.css | 7 +++++++ lms/static/sass/shared_styles/_shared_modal.scss | 15 ++++++++------- lms/templates/login_modal.html | 4 ++-- lms/templates/signup_modal.html | 7 +++---- 5 files changed, 22 insertions(+), 13 deletions(-) diff --git a/lms/static/js/toggle_login_modal.js b/lms/static/js/toggle_login_modal.js index 1eb9e2bfdb..59d83a0dad 100644 --- a/lms/static/js/toggle_login_modal.js +++ b/lms/static/js/toggle_login_modal.js @@ -18,6 +18,8 @@ $(this).click(function(e) { + $(".modal").hide(); + var modal_id = $(this).attr("href"); $("#lean_overlay").click(function() { diff --git a/lms/static/sass/application.css b/lms/static/sass/application.css index 788f65f44a..a7fd818b7a 100644 --- a/lms/static/sass/application.css +++ b/lms/static/sass/application.css @@ -2482,6 +2482,13 @@ header.global { text-align: center; text-shadow: 0 1px rgba(255, 255, 255, 0.4); z-index: 2; } + .modal .inner-wrapper #enroll_error, .modal .inner-wrapper #login_error { + background: #fd5757; + border: 1px solid #ca1111; + color: #8f0e0e; + display: none; + margin-bottom: 20px; + padding: 12px; } .modal .inner-wrapper form { margin-bottom: 12px; padding: 0px 40px; diff --git a/lms/static/sass/shared_styles/_shared_modal.scss b/lms/static/sass/shared_styles/_shared_modal.scss index 2f594c2a7a..fe11cf576b 100644 --- a/lms/static/sass/shared_styles/_shared_modal.scss +++ b/lms/static/sass/shared_styles/_shared_modal.scss @@ -106,13 +106,14 @@ } } - //#enroll_error { - //background: rgb(253, 87, 87); - //border: 1px solid rgb(202, 17, 17); - //color: rgb(143, 14, 14); - //margin-bottom: 20px; - //padding: 12px; - //} + #enroll_error, #login_error { + background: rgb(253, 87, 87); + border: 1px solid rgb(202, 17, 17); + color: rgb(143, 14, 14); + display: none; + margin-bottom: 20px; + padding: 12px; + } //#enroll { //padding: 0 40px; diff --git a/lms/templates/login_modal.html b/lms/templates/login_modal.html index ef809ee0a1..f8c1ca0caf 100644 --- a/lms/templates/login_modal.html +++ b/lms/templates/login_modal.html @@ -24,7 +24,7 @@

- Not enrolled? Sign up. + Not enrolled? Forgot password?

@@ -64,7 +64,7 @@ } else if($('#login_error').length == 0) { $('#login_form').prepend('
Email or password is incorrect.
'); } else { - $('#login_error').stop().css("background-color", "#933").animate({ backgroundColor: "#333"}, 2000); + $('#login_error').stop().css("display", "block"); } } ); diff --git a/lms/templates/signup_modal.html b/lms/templates/signup_modal.html index 5b57e1aadc..0dd3e20d55 100644 --- a/lms/templates/signup_modal.html +++ b/lms/templates/signup_modal.html @@ -31,7 +31,7 @@ @@ -53,7 +53,6 @@
-
@@ -61,7 +60,7 @@

- Already have an account? Login. + Already have an account?

@@ -101,7 +100,7 @@ if(json.success) { $('#enroll').html(json.value); } else { - $('#enroll_error').html(json.value).stop().css("background-color", "#933").animate({ backgroundColor: "#333"}, 2000); + $('#enroll_error').html(json.value).stop().css("display", "block"); } } );