diff --git a/lms/djangoapps/oauth_dispatch/tests/test_views.py b/lms/djangoapps/oauth_dispatch/tests/test_views.py index 6edd6cda35..c943fd5dce 100644 --- a/lms/djangoapps/oauth_dispatch/tests/test_views.py +++ b/lms/djangoapps/oauth_dispatch/tests/test_views.py @@ -182,7 +182,7 @@ class TestAuthorizationView(TestCase): self.assertEqual(response.status_code, 200) # check form is in context and form params are valid - context = response.context # pylint: disable=no-member + context = response.context_data # pylint: disable=no-member self.assertIn('form', context) self.assertIsNone(context['form']['authorize'].value()) diff --git a/lms/static/sass/views/_oauth2.scss b/lms/static/sass/views/_oauth2.scss index 8fcb7459b4..ae3c6fc682 100644 --- a/lms/static/sass/views/_oauth2.scss +++ b/lms/static/sass/views/_oauth2.scss @@ -9,6 +9,7 @@ @include span-columns(6); @include shift(3); + float: unset !important; // fixes issues with oauth page and edx-theme footer line-height: 1.5em; padding: 50px 0; diff --git a/lms/templates/main_django.html b/lms/templates/main_django.html index 80dafdf974..e2d5233ba9 100644 --- a/lms/templates/main_django.html +++ b/lms/templates/main_django.html @@ -1,12 +1,16 @@ -{% load sekizai_tags i18n microsite pipeline optional_include %} +{% load sekizai_tags i18n microsite pipeline optional_include staticfiles %} {% load url from future %} {% block title %}{% platform_name %}{% endblock %} - + + + {% with "js/i18n/"|add:LANGUAGE_CODE|add:"/djangojs.js" as i18njs_path %} + + {% endwith %} {% stylesheet 'style-vendor' %} {% stylesheet 'style-main-v1' %} @@ -23,7 +27,7 @@ -
+
{% trans "Skip to main content" %} {% with course=request.course %} {% include "header.html"|microsite_template_path %} @@ -38,8 +42,7 @@
- {% javascript 'application' %} - {% javascript 'module-js' %} + {% javascript 'base_application' %} {% render_block "js" %} diff --git a/lms/templates/provider/authorize.html b/lms/templates/provider/authorize.html index f3f34b08ed..6181de9725 100644 --- a/lms/templates/provider/authorize.html +++ b/lms/templates/provider/authorize.html @@ -1,59 +1,70 @@ -{% extends "main_django.html" %} +## mako -{% load scope i18n %} +<%page expression_filter="h"/> -{% block bodyclass %}oauth2{% endblock %} +<%! +from django.utils.translation import ugettext as _ +from provider.templatetags.scope import scopes +from django.core.urlresolvers import reverse +from openedx.core.djangolib.markup import Text, HTML +%> -{% block body %} +<%inherit file="../main.html"/> + +<%block name="bodyclass">oauth2 + +<%block name="body">
- {% if not error %} + % if not error:

- {% blocktrans with application_name=client.name %} - {{ application_name }} would like to access your data with the following permissions: - {% endblocktrans %} + ${Text(_("{start_strong}{application_name}{end_strong} would like to access your data with the following permissions:")).format( + start_strong=HTML(""), + application_name=client.name, + end_strong=HTML("") + )}

-
- {% csrf_token %} - {{ form.errors }} - {{ form.non_field_errors }} + + ${form.errors} + ${form.non_field_errors()}
+
- {% else %} + % else:

- {{ error }} - {{ error_description }} + ${error} + ${error_description}

- {% endif %} + % endif
-{% endblock %} + diff --git a/lms/templates/registration/password_reset_complete.html b/lms/templates/registration/password_reset_complete.html index 702aa7b134..af83c40e1b 100644 --- a/lms/templates/registration/password_reset_complete.html +++ b/lms/templates/registration/password_reset_complete.html @@ -1,11 +1,19 @@ -{% extends "main_django.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 Text, HTML +%> + +<%inherit file="../main.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 cddebf7854..e28d16ecf0 100644 --- a/lms/templates/registration/password_reset_confirm.html +++ b/lms/templates/registration/password_reset_confirm.html @@ -1,72 +1,85 @@ -{% extends "main_django.html" %} -{% load i18n %} +## mako -{% block title %} - -{% blocktrans with platform_name=platform_name %} - Reset Your {{ platform_name }} Password -{% endblocktrans %} - -{% endblock %} +<%page expression_filter="h"/> -{% block bodyextra %} - -{% endblock %} +<%! +from django.utils.translation import ugettext as _ +from openedx.core.djangolib.markup import Text, HTML +%> -{% block bodyclass %}view-passwordreset{% endblock %} +<%inherit file="../main.html"/> -{% block body %} +<%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/support/refund.html b/lms/templates/support/refund.html index b42494f9fd..d45dd149f6 100644 --- a/lms/templates/support/refund.html +++ b/lms/templates/support/refund.html @@ -1,11 +1,20 @@ -{% extends "main_django.html" %} -{% load i18n %} -{% block title %} +## mako + +<%page expression_filter="h"/> + +<%! +from django.utils.translation import ugettext as _ +from django.utils.html import escape +%> + +<%inherit file="../main.html"/> + +<%block name="title"> Manual Refund -{% endblock %} -{% block headextra %} + +<%block name="headextra"> -{% endblock %} + -{% block body %} +<%block name="body">
-

{% trans "Manual Refund" %}

- {% if messages %} +

${_("Manual Refund")}

+ % if messages:
    - {% for message in messages %} - {{ message }} - {% endfor %} + % for message in messages: +
  • ${message}
  • + % endfor
- {% endif %} + % endif
- {% csrf_token %} - {{form.as_p}} + + ${form.as_p()}

- +

- {% if cert %} + % if cert:

- {% trans "About to refund this order:" %} + ${_("About to refund this order:")}

- {% trans "Order Id:" %} {{cert.order.id}} + ${_("Order Id:")} ${cert.order.id}

- {% trans "Enrollment:" %} {{enrollment.course_id|escape}} {{enrollment.mode}} ({% if enrollment.is_active %}{% trans "enrolled" %}{% else %}{% trans "unenrolled" %}{% endif %}) + ${_("Enrollment:")} ${escape(enrollment.course_id)} ${enrollment.mode} + (${_("enrolled") if enrollment.is_active else _("unenrolled")})

- {% trans "Cost:" %} {{cert.unit_cost}} {{cert.currency}} + ${_("Cost:")} ${cert.unit_cost} ${cert.currency}

- {% trans "CertificateItem Status:" %} {{cert.status}} + ${_("CertificateItem Status:")} ${cert.status}

- {% trans "Order Status:" %} {{cert.order.status}} + ${_("Order Status:")} ${cert.order.status}

- {% trans "Fulfilled Time:" %} {{cert.fulfilled_time}} + ${_("Fulfilled Time:")} ${cert.fulfilled_time}

- {% trans "Refund Request Time:" %} {{cert.refund_requested_time}} + ${_("Refund Request Time:")} ${cert.refund_requested_time}

- {% endif %} + % endif
-{% endblock %} + diff --git a/lms/templates/wiki/base.html b/lms/templates/wiki/base.html index c8f5eadf29..2a9c69fed9 100644 --- a/lms/templates/wiki/base.html +++ b/lms/templates/wiki/base.html @@ -6,7 +6,6 @@ {% block bodyclass %}view-in-course view-wiki{% endblock %} {% block headextra %} - {% stylesheet 'course' %} {% stylesheet 'style-course-vendor' %} {% stylesheet 'style-course' %}