From 879232af461462db7c553b3c46497f1190ccdeec Mon Sep 17 00:00:00 2001 From: Bertrand Marron Date: Wed, 18 Jun 2014 11:59:15 +0200 Subject: [PATCH 1/3] Make use of django_main for password_reset templates Remove duplicated code and make sure those views use the same visual identity. --- .../registration/password_reset_complete.html | 63 +++++++------------ .../registration/password_reset_confirm.html | 57 ++++++----------- 2 files changed, 40 insertions(+), 80 deletions(-) diff --git a/lms/templates/registration/password_reset_complete.html b/lms/templates/registration/password_reset_complete.html index ae6d6a9ae7..908f2d610f 100644 --- a/lms/templates/registration/password_reset_complete.html +++ b/lms/templates/registration/password_reset_complete.html @@ -1,25 +1,11 @@ +{% extends "main_django.html" %} {% load i18n %} -{% load compressed %} -{% load staticfiles %} - - - - {% trans "Your Password Reset is Complete" %} - - {% compressed_css 'style-vendor' %} - {% compressed_css 'style-app' %} - {% compressed_css 'style-app-extend1' %} - {% compressed_css 'style-app-extend2' %} - - {% block main_vendor_js %} - {% compressed_js 'main_vendor' %} - {% endblock %} - - +{% block title %} +{% trans "Your Password Reset is Complete" %} +{% endblock %} +{% block bodyextra %} +{% endblock %} - +{% block bodyclass %}view-passwordreset{% endblock %} - - -
- -
- -
-
-
-
-

{% trans "Your Password Reset is Complete" %}

-
-
+{% block body %} +
+
+

+ + {% trans "Your Password Reset is Complete" %} + +

+
+
+
{% block content %} -
+
{% blocktrans with link_start='' link_end='' %} Your password has been set. You may go ahead and {{ link_start }}log in{{ link_end }} now. {% endblocktrans %} -
+
{% endblock %} -
-
+ +{% endblock %} diff --git a/lms/templates/registration/password_reset_confirm.html b/lms/templates/registration/password_reset_confirm.html index ad048d458a..6bf9f3e194 100644 --- a/lms/templates/registration/password_reset_confirm.html +++ b/lms/templates/registration/password_reset_confirm.html @@ -1,29 +1,15 @@ +{% extends "main_django.html" %} {% load i18n %} -{% load compressed %} -{% load staticfiles %} - - - +{% block title %} {% blocktrans with platform_name=platform_name %} Reset Your {{ platform_name }} Password {% endblocktrans %} +{% endblock %} - {% compressed_css 'style-vendor' %} - {% compressed_css 'style-app' %} - {% compressed_css 'style-app-extend1' %} - {% compressed_css 'style-app-extend2' %} - - {% block main_vendor_js %} - {% compressed_js 'main_vendor' %} - {% endblock %} - - - +{% block bodyextra %} +{% endblock %} - +{% block bodyclass %}view-passwordreset{% endblock %} - - -
- -
- -
-
-
-
-

+{% block body %} +
+
+

+ {% blocktrans with platform_name=platform_name %} Reset Your {{ platform_name }} Password {% endblocktrans %} -

-
-
+ +

+
+
+
{% if validlink %}

{% trans "Password Reset Form" %}

-
{% csrf_token %} + {% csrf_token %}
-
+{% endblock %} From 70f698267aaa0db1cf21400a1d8f9835cc275e72 Mon Sep 17 00:00:00 2001 From: Bertrand Marron Date: Fri, 20 Jun 2014 17:39:28 +0200 Subject: [PATCH 2/3] Update password reset views style Reuse the style from login and register views. Remove all the specific style. --- lms/static/sass/application-extend1.scss.mako | 1 - lms/static/sass/base/_variables.scss | 1 + lms/static/sass/multicourse/_account.scss | 25 ++--- .../sass/multicourse/_password_reset.scss | 95 ------------------- lms/static/sass/shared/_footer.scss | 2 +- lms/static/sass/shared/_header.scss | 2 +- 6 files changed, 11 insertions(+), 115 deletions(-) delete mode 100644 lms/static/sass/multicourse/_password_reset.scss diff --git a/lms/static/sass/application-extend1.scss.mako b/lms/static/sass/application-extend1.scss.mako index cb993e14b6..88af68783f 100644 --- a/lms/static/sass/application-extend1.scss.mako +++ b/lms/static/sass/application-extend1.scss.mako @@ -52,7 +52,6 @@ @import 'multicourse/media-kit'; @import 'multicourse/about_pages'; @import 'multicourse/press_release'; -@import 'multicourse/password_reset'; @import 'multicourse/error-pages'; @import 'multicourse/help'; @import 'multicourse/edge'; diff --git a/lms/static/sass/base/_variables.scss b/lms/static/sass/base/_variables.scss index 2b6a316836..fb1b5ea5e8 100644 --- a/lms/static/sass/base/_variables.scss +++ b/lms/static/sass/base/_variables.scss @@ -382,6 +382,7 @@ $homepage-bg-image: none; $login-banner-image: url(../images/bg-banner-account.png); $register-banner-image: url(../images/bg-banner-account.png); +$passwordreset-banner-image: url(../images/bg-banner-account.png); $video-thumb-url: '../images/courses/video-thumb.jpg'; diff --git a/lms/static/sass/multicourse/_account.scss b/lms/static/sass/multicourse/_account.scss index 2f83bfbf95..a2a7a72a52 100644 --- a/lms/static/sass/multicourse/_account.scss +++ b/lms/static/sass/multicourse/_account.scss @@ -115,7 +115,7 @@ } .introduction { - padding: ($baseline*2) $baseline 0 $baseline; + padding: 0; header { position: relative; @@ -533,8 +533,6 @@ } .introduction { - padding: 0; - header { height: 120px; border-bottom: 1px solid $m-gray; @@ -547,8 +545,6 @@ .view-register { .introduction { - padding: 0; - header { height: 120px; border-bottom: 1px solid $m-gray; @@ -559,26 +555,21 @@ // password reset .view-passwordreset { - background: $sidebar-color; - header.global { - - h1 { - float: none; - } + header.global .nav-courseware .cta-login { + display: none; } .introduction { - width: auto; - padding: 0; - - header h1 { - margin: 0; + header { + height: 120px; + border-bottom: 1px solid $m-gray; + background: transparent $passwordreset-banner-image 0 0 no-repeat; } } .content { - margin-top: 0; + padding: 0; } } diff --git a/lms/static/sass/multicourse/_password_reset.scss b/lms/static/sass/multicourse/_password_reset.scss deleted file mode 100644 index 14c6d4ecc5..0000000000 --- a/lms/static/sass/multicourse/_password_reset.scss +++ /dev/null @@ -1,95 +0,0 @@ -.password-reset { - background: rgb(245,245,245); - border: 1px solid rgb(200,200,200); - border-radius: 4px; - @include box-sizing(border-box); - box-shadow: 0 5px 50px 0 rgba(0,0,0, 0.3); - margin: 120px auto 0; - padding: 0px 40px 40px; - width: flex-grid(5); - - header { - margin-bottom: 30px; - overflow: hidden; - padding: 28px 20px 0px; - position: relative; - z-index: 2; - - &::before { - @include background-image(radial-gradient(50% 50%, circle closest-side, rgba(255,255,255, 0.8) 0%, rgba(255,255,255, 0) 100%)); - content: ""; - display: block; - height: 400px; - left: 0px; - margin: 0 auto; - position: absolute; - top: -140px; - width: 100%; - z-index: 1; - } - - hr { - @extend %faded-hr-divider-light; - border: none; - margin: 0px; - position: relative; - z-index: 2; - - &::after { - @extend %faded-hr-divider; - bottom: 0px; - content: ""; - display: block; - position: absolute; - top: -1px; - } - } - - h2 { - position: relative; - text-align: center; - text-shadow: 0 1px rgba(255,255,255, 0.4); - z-index: 2; - } - } - - > p { - margin-bottom: 20px; - } - - form { - margin-bottom: 12px; - position: relative; - z-index: 2; - - label { - display: none; - } - - input[type="checkbox"] { - margin-right: 5px; - } - - input[type="email"], - input[type="text"], - input[type="password"] { - border: 1px solid red !important; - background: rgb(255,255,255); - display: block; - height: 45px; - margin-bottom: 20px; - width: 100%; - } - - .submit { - padding-top: 10px; - - input[type="submit"] { - display: block; - height: 45px; - margin: 0 auto; - width: 100%; - } - } - } -} diff --git a/lms/static/sass/shared/_footer.scss b/lms/static/sass/shared/_footer.scss index 223b926a23..49428868a8 100644 --- a/lms/static/sass/shared/_footer.scss +++ b/lms/static/sass/shared/_footer.scss @@ -187,7 +187,7 @@ } // marketing site design syncing -.view-register, .view-login { +.view-register, .view-login, .view-passwordreset { .wrapper-footer footer { width: 960px; diff --git a/lms/static/sass/shared/_header.scss b/lms/static/sass/shared/_header.scss index 1d55a4b25a..8d6618240c 100644 --- a/lms/static/sass/shared/_header.scss +++ b/lms/static/sass/shared/_header.scss @@ -298,7 +298,7 @@ header.global { } // marketing site design syncing -.view-register, .view-login { +.view-register, .view-login, .view-passwordreset { header.global nav { width: 960px; From bd1e25baff71f89d82ea2effd436f757d728df94 Mon Sep 17 00:00:00 2001 From: Bertrand Marron Date: Thu, 21 Aug 2014 15:18:39 +0200 Subject: [PATCH 3/3] Fix 'change my password' button font size --- lms/static/sass/multicourse/_account.scss | 1 + 1 file changed, 1 insertion(+) diff --git a/lms/static/sass/multicourse/_account.scss b/lms/static/sass/multicourse/_account.scss index a2a7a72a52..26cafdc432 100644 --- a/lms/static/sass/multicourse/_account.scss +++ b/lms/static/sass/multicourse/_account.scss @@ -423,6 +423,7 @@ button[type="submit"] { @extend %m-btn-primary; + @extend %t-action2; &:disabled, &.is-disabled { opacity: 0.3;