-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathauthorize.html
More file actions
44 lines (44 loc) · 1.81 KB
/
authorize.html
File metadata and controls
44 lines (44 loc) · 1.81 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
{% load i18n %}
{% load static %}
<link rel="stylesheet" href="{% static 'css/main.css' %}" type="text/css">
<head>
<meta charset="UTF-8">
<title>Authorize</title>
<script type="text/javascript">
window.onload=function(){
const element = document.getElementById("logout-link")
element.href += encodeURIComponent(window.location.pathname + window.location.search)
}
</script>
</head>
<body>
<div class="page-wrap gradient-primary">
<div class="container">
<div class="panel">
{% if not error %}
<h2 class="h3">{% trans "Authorize" %} {{ application.name }}?</h2>
{{ updated }}
<div>{{ application.name }} wants to access your {{ request.user.username }} account</div>
<form id="authorizationForm" method="post">
{% csrf_token %}
{% for field in form %}
{% if field.is_hidden %}
{{ field }}
{% endif %}
{% endfor %}
{{ form.errors }}
{{ form.non_field_errors }}
<br>
<input type="submit" class="btn btn-primary btn-lg btn-block" name="allow" value="{% trans 'Authorize' %}"/>
</form>
<a id="logout-link" class="panel-footer" href="/user/logout?next=">With another account? <span>Sigin In</span></a>
{% else %}
<h2 class="h3">{{ error.error }}</h2>
<p class="tc gray-90 inverted-wrapper">{{ error.description }}</p>
<div class="inverted-wrapper"></div>
{% endif %}
</div>
</div>
{% include "base/footer.html" %}
</div>
</body>