mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-08-05 12:19:31 +00:00
See: https://github.com/validator/validator/wiki/Markup-%C2%BB-Void-elements Tests: - Fewer info messages in w3c HTML validator. - Page loads and works as usual. Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org> Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
70 lines
2.2 KiB
HTML
70 lines
2.2 KiB
HTML
{% extends "base.html" %}
|
|
{% comment %}
|
|
# SPDX-License-Identifier: AGPL-3.0-or-later
|
|
{% endcomment %}
|
|
|
|
{% load i18n %}
|
|
{% load static %}
|
|
{% load bootstrap %}
|
|
|
|
{% block wrapper %}
|
|
<div class="container narrow-container authorize-container">
|
|
<div class="d-flex flex-row align-items-center authorize-diagram">
|
|
<img src="{% static 'theme/img/application.svg' %}"
|
|
class="col-image network-entity" alt="{% trans "Application" %}">
|
|
<img src="{% static 'theme/img/network-connection.svg' %}"
|
|
class="col-image network-connection"
|
|
alt="{% trans "Connection" %}">
|
|
<img src="{% static 'theme/img/network-freedombox.svg' %}"
|
|
class="col-image network-entity" alt="{{ box_name }}">
|
|
</div>
|
|
|
|
<h3>{% trans "Authorize App" %}</h3>
|
|
|
|
{% if not error %}
|
|
<form id="authorizationForm" class="form form-authorize" method="post">
|
|
{% csrf_token %}
|
|
|
|
{% for field in form %}
|
|
{% if field.is_hidden %}
|
|
{{ field }}
|
|
{% endif %}
|
|
{% endfor %}
|
|
|
|
<ul class="list-group">
|
|
<li class="list-group-item">
|
|
{% trans application.name as app %}
|
|
{% blocktrans trimmed with username=request.user.username %}
|
|
<strong>{{ app }}</strong> wants to access your account <strong>
|
|
{{ username }}</strong>
|
|
{% endblocktrans %}
|
|
</li>
|
|
{% for scope in scopes_descriptions %}
|
|
<li class="list-group-item">{% trans scope %}</li>
|
|
{% endfor %}
|
|
</ul>
|
|
|
|
{{ form.errors }}
|
|
{{ form.non_field_errors }}
|
|
|
|
<div class="submit-container">
|
|
<input type="submit" class="btn btn-large btn-primary" name="allow"
|
|
value="{% blocktrans trimmed with app=application.name %}
|
|
Authorize {{ app }}
|
|
{% endblocktrans %}"/>
|
|
</div>
|
|
</form>
|
|
|
|
<p class="text-secondary">
|
|
{% blocktrans trimmed with url=form.redirect_uri.value %}
|
|
Authorizing will redirect to {{ url }}
|
|
{% endblocktrans %}
|
|
</p>
|
|
{% else %}
|
|
<h3>{% trans "Error:" %} {{ error.error }}</h3>
|
|
<p>{{ error.description }}</p>
|
|
{% endif %}
|
|
|
|
</div>
|
|
{% endblock %}
|