Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
edx-platform
Commits
784e200a
Commit
784e200a
authored
Apr 12, 2016
by
Brian Jacobel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
OAuth grant screen converted to mako (3/4)
parent
422147ea
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
44 additions
and
37 deletions
+44
-37
lms/templates/provider/authorize.html
+44
-37
No files found.
lms/templates/provider/authorize.html
View file @
784e200a
{% 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>
<
%
block
name=
"body"
>
<div
class=
"authorization-confirmation"
>
<div
class=
"authorization-confirmation"
>
{% if not error %}
% if not error:
<p>
<p>
{% blocktrans with application_name=client.name %}
${_(
<strong>
{{ application_name }}
</strong>
would like to access your data with the following permissions:
"
<strong>
{application_name}
</strong>
would like to access your data with the following permissions:"
{% endblocktrans %}
.format(application_name=client.name)
)}
</p>
</p>
<ul>
<ul>
{% for permission in oauth_data.scope|scopes %}
% for permission in scopes(oauth_data['scope']):
<li>
<li>
{% if permission == "openid" %}
% if permission == "openid":
{% trans "Read your user ID" %
}
${_("Read your user ID")
}
{% elif permission == "profile" %}
% elif permission == "profile":
{% trans "Read your user profile" %
}
${_("Read your user profile")
}
{% elif permission == "email" %}
% elif permission == "email":
{% trans "Read your email address" %
}
${_("Read your email address")
}
{% elif permission == "course_staff" %}
% elif permission == "course_staff":
{% trans "Read the list of courses in which you are a staff member." %
}
${_("Read the list of courses in which you are a staff member.")
}
{% elif permission == "course_instructor" %}
% elif permission == "course_instructor":
{% trans "Read the list of courses in which you are an instructor." %
}
${_("Read the list of courses in which you are an instructor.")
}
{% elif permission == "permissions" %}
% elif permission == "permissions":
{% trans "To see if you are a global staff user" %
}
${_("To see if you are a global staff user")
}
{% else %}
% else:
{% blocktrans %}Manage your data: {{ permission }}{% endblocktrans %
}
${_("Manage your data: {permission}".format(permission=permission))
}
{% endif %}
% endif
</li>
</li>
{% endfor %}
% endfor
</ul>
</ul>
<form
method=
"post"
action=
"{% url "
oauth2:authorize
"
%}"
>
<form
method=
"post"
action=
"${reverse('oauth2:authorize')}"
>
{% csrf_token %}
${form.errors}
{{ form.errors }}
${form.non_field_errors()}
{{ form.non_field_errors }}
<fieldset>
<fieldset>
<div
style=
"display: none;"
>
<div
style=
"display: none;"
>
<select
type=
"select"
name=
"scope"
multiple=
"multiple"
>
<select
type=
"select"
name=
"scope"
multiple=
"multiple"
>
{% for scope in oauth_data.scope|scopes %}
% for scope in scopes(oauth_data['scope']):
<option
value=
"
{{ scope }}"
selected=
"selected"
>
{{ scope }
}
</option>
<option
value=
"
${scope}"
selected=
"selected"
>
${scope
}
</option>
{% endfor %}
% endfor
</select>
</select>
</div>
</div>
<input
type=
"submit"
class=
"btn login large danger"
name=
"cancel"
value=
"Cancel"
/>
<input
type=
"submit"
class=
"btn login large danger"
name=
"cancel"
value=
"Cancel"
/>
<input
type=
"submit"
class=
"btn login large primary"
name=
"authorize"
value=
"Authorize"
/>
<input
type=
"submit"
class=
"btn login large primary"
name=
"authorize"
value=
"Authorize"
/>
</fieldset>
</fieldset>
<input
type=
"hidden"
id=
"csrf_token"
name=
"csrfmiddlewaretoken"
value=
"${csrf_token}"
/>
</form>
</form>
{% else %}
% else:
<p
class=
"error"
>
<p
class=
"error"
>
{{ error }
}
${error
}
{{ error_description }
}
${error_description
}
</p>
</p>
{% endif %}
% endif
</div>
</div>
{% endblock %}
</
%
block>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment