From 846b9a0e016a62d17374815b1779c23a46f3eaee Mon Sep 17 00:00:00 2001 From: Ki Song Date: Fri, 30 Dec 2016 20:04:40 -0500 Subject: [PATCH] Eucalyptus update --- lms/static/css/account.css | 49 ++++++++++- .../registration/password_reset_complete.html | 37 +++++--- .../registration/password_reset_confirm.html | 88 +++++++++++-------- .../student_account/account_settings.html | 20 ++++- 4 files changed, 137 insertions(+), 57 deletions(-) diff --git a/lms/static/css/account.css b/lms/static/css/account.css index 57da71e..8ac72ba 100644 --- a/lms/static/css/account.css +++ b/lms/static/css/account.css @@ -1,3 +1,46 @@ +.list-inline { + margin: 0; + padding: 0px 0px 20px 0px; + list-style: none; + display: table; /* [1] */ + table-layout: fixed; /* [2] */ + width: 100%; /* [3] */ + +} + +.account-nav { + text-align: center; + overflow: hidden; /* [1] */ +} + +.account-nav-item { + display: table-cell; /* [4] */ +} + +.account-nav-link { + border: none; + text-decoration: none; + -webkit-border-radius: 0; + -moz-border-radius: 0; + border-radius: 0px; + padding: 1em; + background-color: #2D79A2; + color: #fff; + font-weight: bold; + font-size: 12px; + width: 100%; +} + +.account-nav:last-child { + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; +} + +.account-nav-link:hover { + background-color: #383C4B; +} + textarea:last-child, input[type="text"]:last-child, input[type="email"]:last-child, input[type="password"]:last-child, input[type="tel"]:last-child { margin-right: 0; } @@ -24,7 +67,7 @@ textarea, input[type="text"], input[type="email"], input[type="password"], input } .u-field-title { width: 23.72881%; - display: inline-block; + /**display: inline-block;*/ font-size: 14px; vertical-align: top; margin-bottom: 0; @@ -33,14 +76,14 @@ textarea, input[type="text"], input[type="email"], input[type="password"], input -webkit-font-smoothing: antialiased; } .u-field-value { - width: 23.72881%; + width: 35%; display: inline-block; vertical-align: top; font-size: 14px; } .u-field-message { padding-left: 20px; - width: 49.15254%; + width: 60%; display: inline-block; vertical-align: top; color: #919191; diff --git a/lms/templates/registration/password_reset_complete.html b/lms/templates/registration/password_reset_complete.html index 1c2f0c8..24a7f32 100644 --- a/lms/templates/registration/password_reset_complete.html +++ b/lms/templates/registration/password_reset_complete.html @@ -1,11 +1,19 @@ -{% extends "main_django_ava.html" %} -{% load i18n %} +## mako -{% block title %} -{% trans "Your Password Reset is Complete" %} -{% endblock %} +<%page expression_filter="h"/> -{% block bodyextra %} +<%! +from django.utils.translation import ugettext as _ +from openedx.core.djangolib.markup import HTML, Text +%> + +<%inherit file="../main-ava.html"/> + +<%block name="title"> + ${_("Your Password Reset is Complete")} + + +<%block name="bodyextra"> -{% endblock %} + -{% block bodyclass %}view-passwordreset{% endblock %} +<%block name="bodyclass">view-passwordreset -{% block body %} +<%block name="body">
- {% trans "Password Reset Complete" %} + ${_("Password Reset Complete")}

- {% blocktrans with link_start='' link_end='' %} - Your password has been reset. {{ link_start }}Sign in to your account.{{ link_end }} - {% endblocktrans %} + ${Text(_("Your password has been reset. {start_link}Sign-in to your account.{end_link}")).format( + start_link=HTML(''), + end_link=HTML('') + )}

-{% endblock %} + diff --git a/lms/templates/registration/password_reset_confirm.html b/lms/templates/registration/password_reset_confirm.html index 0d3600a..23aebe7 100644 --- a/lms/templates/registration/password_reset_confirm.html +++ b/lms/templates/registration/password_reset_confirm.html @@ -1,88 +1,104 @@ -{% extends "main_django_ava.html" %} -{% load i18n %} +## mako -{% block title %} - -{% blocktrans with platform_name=platform_name %} - Reset Your {{ platform_name }} Password -{% endblocktrans %} - -{% endblock %} -{% block bodyclass %}view-passwordreset{% endblock %} -{% block body %} +<%page expression_filter="h"/> + +<%! +from django.utils.translation import ugettext as _ +from openedx.core.djangolib.markup import HTML, Text +%> + +<%inherit file="../main-ava.html"/> + +<%block name="title"> + ${_("Reset Your {platform_name} Password").format(platform_name=platform_name)} + + +<%block name="bodyextra"> + + + +<%block name="bodyclass">view-passwordreset + +<%block name="body">
-{% endblock %} + diff --git a/lms/templates/student_account/account_settings.html b/lms/templates/student_account/account_settings.html index dde697b..e38641a 100644 --- a/lms/templates/student_account/account_settings.html +++ b/lms/templates/student_account/account_settings.html @@ -1,8 +1,13 @@ +<%page expression_filter="h"/> + <%! import json + from django.core.urlresolvers import reverse from django.conf import settings from django.utils.translation import ugettext as _ + +from openedx.core.djangolib.js_utils import dump_js_escaped_json, js_escaped_string %> @@ -37,12 +42,19 @@ <%block name="js_extra"> <%static:require_module module_name="js/student_account/views/account_settings_factory" class_name="AccountSettingsFactory"> - var fieldsData = ${ json.dumps(fields) }; - var authData = ${ json.dumps(auth) }; - var platformName = ${json.dumps(static.get_platform_name())}; + var fieldsData = ${ fields | n, dump_js_escaped_json }, + ordersHistoryData = ${ order_history | n, dump_js_escaped_json }, + authData = ${ auth | n, dump_js_escaped_json }, + platformName = '${ static.get_platform_name() | n, js_escaped_string }'; AccountSettingsFactory( - fieldsData, authData, '${user_accounts_api_url}', '${user_preferences_api_url}', ${user.id}, platformName + fieldsData, + ordersHistoryData, + authData, + '${ user_accounts_api_url | n, js_escaped_string }', + '${ user_preferences_api_url | n, js_escaped_string }', + ${ user.id | n, dump_js_escaped_json }, + platformName );