From 4a9960e4b047dae68949e6fa3132e75632a902f5 Mon Sep 17 00:00:00 2001 From: Brian Jacobel Date: Tue, 12 Apr 2016 15:01:41 -0400 Subject: [PATCH] OAuth grant screen converted to mako (3/4) --- lms/templates/provider/authorize.html | 81 +++++++++++++++------------ 1 file changed, 44 insertions(+), 37 deletions(-) diff --git a/lms/templates/provider/authorize.html b/lms/templates/provider/authorize.html index f3f34b08ed..e3867b036f 100644 --- a/lms/templates/provider/authorize.html +++ b/lms/templates/provider/authorize.html @@ -1,59 +1,66 @@ -{% extends "main_django.html" %} +## mako -{% load scope i18n %} +<%! +from django.utils.translation import ugettext as _ +from provider.templatetags.scope import scopes +from django.core.urlresolvers import reverse +%> -{% block bodyclass %}oauth2{% endblock %} +<%inherit file="../main.html"/> -{% block body %} +<%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 %} + ${_( + "{application_name} would like to access your data with the following permissions:" + .format(application_name=client.name) + )}

-
- {% 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 %} +