-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathauthorize.html
More file actions
41 lines (41 loc) · 1.45 KB
/
authorize.html
File metadata and controls
41 lines (41 loc) · 1.45 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
{% extends 'base/layout.html' %}
{% load i18n %}
{% block title %}Authorize{% endblock %}
{% block content %}
<div class="panel">
{% if not error %}
<h2 class="h3">{% trans "Authorize" %} {{ application.name }}?</h2>
{{ updated }}
<form id="authorizationForm" method="post">
<div class="form-group">
<p class="gray-90">{{ application.name }} wants to access your {{ request.user.username }} account</p>
</div>
{% 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>Sign 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>
{% endblock %}
{% block extra_scripts %}
<script>
document.addEventListener('DOMContentLoaded', function() {
const element = document.getElementById("logout-link");
if (element) {
element.href += encodeURIComponent(window.location.pathname + window.location.search);
}
});
</script>
{% endblock %}