Skip to content

Commit

Permalink
Eucalyptus update
Browse files Browse the repository at this point in the history
  • Loading branch information
Ki Song committed Dec 31, 2016
1 parent 533ac44 commit 846b9a0
Show file tree
Hide file tree
Showing 4 changed files with 137 additions and 57 deletions.
49 changes: 46 additions & 3 deletions lms/static/css/account.css
Original file line number Diff line number Diff line change
@@ -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;
}
Expand All @@ -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;
Expand All @@ -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;
Expand Down
37 changes: 23 additions & 14 deletions lms/templates/registration/password_reset_complete.html
Original file line number Diff line number Diff line change
@@ -1,35 +1,44 @@
{% extends "main_django_ava.html" %}
{% load i18n %}
## mako

{% block title %}
<title>{% trans "Your Password Reset is Complete" %}</title>
{% 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>

<%block name="bodyextra">
<script type="text/javascript">
$(function() {
'use strict';
// adding js class for styling with accessibility in mind
$('body').addClass('js');
});
</script>
{% endblock %}
</%block>

{% block bodyclass %}view-passwordreset{% endblock %}
<%block name="bodyclass">view-passwordreset</%block>

{% block body %}
<%block name="body">
<section class="full-section">
<div class="container clear-bottommargin clearfix">
<div class="col-md-12">
<div class="activation-message valid top-margin">
{% trans "Password Reset Complete" %}
${_("Password Reset Complete")}
</div>
</div>
<p class="activation-p">
{% blocktrans with link_start='<a href="/login">' link_end='</a>' %}
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('<a href="/login">'),
end_link=HTML('</a>')
)}
</p>
</div>
</section>
{% endblock %}
</%block>
88 changes: 52 additions & 36 deletions lms/templates/registration/password_reset_confirm.html
Original file line number Diff line number Diff line change
@@ -1,88 +1,104 @@
{% extends "main_django_ava.html" %}
{% load i18n %}
## mako

{% block title %}
<title>
{% blocktrans with platform_name=platform_name %}
Reset Your {{ platform_name }} Password
{% endblocktrans %}
</title>
{% 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>

<%block name="bodyextra">
<script type="text/javascript" src="${STATIC_URL}js/student_account/password_reset.js"></script>
</%block>

<%block name="bodyclass">view-passwordreset</%block>

<%block name="body">
<section class="login-page">
<div class="container">
<div class="col-md-8 col-md-offset-2">
<div id="password-reset-confirm-container" class="login-register">
<section id="password-reset-confirm-anchor" class="form-type">
<div id="password-reset-confirm-form" class="form-wrapper" aria-live="polite">
<div class="{% if not err_msg %} hidden {% endif %}">
<div class="${'hidden' if not err_msg else ''}">
<div role="alert">
<div class="alert-box">
<h4 class="message-title">{% trans "Error Resetting Password" %}</h4>
<h4 class="message-title">${_("Error Resetting Password")}</h4>
<ul class="message-copy">
{% if err_msg %}
<li>{{err_msg}}</li>
{% else %}
<li>{% trans "You must enter and confirm your new password." %}</li>
<li>{% trans "The text in both password fields must match." %}</li>
{% endif %}
% if err_msg:
<li>${err_msg}</li>
% else:
<li>${_("You must enter and confirm your new password.")}</li>
<li>${_("The text in both password fields must match.")}</li>
% endif
</ul>
</div>
</div>
</div>
{% if validlink %}

% if validlink:
<div class="login-form">
<form role="form" id="passwordreset-form" method="post" action="" >{% csrf_token %}
<form role="form" id="passwordreset-form" method="post" action="" >
<div class="login-title section-title lines">
<h2>
<span class="text">
{% trans "Reset Your Password" %}
${_("Reset Your Password")}
</span>
</h2>
</div>

<p class="action-label" id="new_password_help_text">
{% trans "Enter and confirm your new password." %}
${_("Enter and confirm your new password.")}
</p>
<div class="row">
<div class="col-md-6">
<div class="input form-field new_password1-new_password1">
<input id="new_password1" type="password" name="new_password1" placeholder="New Password" aria-describedby="new_password_help_text" />
<input id="new_password1" type="password" name="new_password1" placeholder="${_("New Password")}" aria-describedby="new_password_help_text" />
</div>
</div>
<div class="col-md-6">
<div class="input form-field new_password2-new_password2">
<input id="new_password2" type="password" name="new_password2" placeholder="Confirm Password" />
<input id="new_password2" type="password" name="new_password2" placeholder="${_("Confirm Password")}" />
</div>
</div>
<input type="hidden" id="csrf_token" name="csrfmiddlewaretoken" value="${csrf_token}">
<div class="col-md-12">
<div class="input clearfix">
<div class="form-actions">
<button type="submit" class="action action-primary action-update js-reset submit-input grad-btn ln-tr">{% trans "Reset My Password" %}</button>
<button type="submit" class="action action-primary action-update js-reset submit-input grad-btn ln-tr">${_("Reset My Password")}</button>
</div>
</div>
</div>
</form>
</div>

{% else %}
% else:
<div role="alert">
<div class="alert-box">
<h4 class="message-title">{% trans "Invalid Password Reset Link" %}</h4>
<div class="alert-box" style="padding-bottom: 15px;">
<h4 class="message-title">${_("Invalid Password Reset Link")}</h4>
<ul class="message-copy">
{% blocktrans with start_link='<a href="/login">' end_link='</a>' %}
This password reset link is invalid. It may have been used already. To reset your password, go to the {{ start_link }}sign-in{{ end_link }} page and select <strong>Forgot password</strong>.
{% endblocktrans %}
${Text(_((
"This password reset link is invalid. It may have been used already. To reset your password, "
"go to the {start_link}sign-in{end_link} page and select {start_strong}Forgot password{end_strong}."
))).format(
start_link=HTML('<a href="/login">'),
end_link=HTML('</a>'),
start_strong=HTML('<strong>'),
end_strong=HTML('</strong>')
)
}
</ul>
</div>
</div>
{% endif %}
% endif
</div>
</section>
</div> <!-- password reset container -->
</div> <!-- end col -->
</div> <!-- end container -->
</section>
{% endblock %}
</%block>
20 changes: 16 additions & 4 deletions lms/templates/student_account/account_settings.html
Original file line number Diff line number Diff line change
@@ -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
%>

<!--<%namespace name='static' file='/static_content.html'/>-->
Expand Down Expand Up @@ -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
);
</%static:require_module>
</%block>

0 comments on commit 846b9a0

Please sign in to comment.