forked from CGM_Public/pretix_original
OAuth authorize dialog: Show which user you are logged in as
This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
{% load compress %}
|
{% load compress %}
|
||||||
{% load i18n %}
|
{% load i18n %}
|
||||||
|
{% load hijack_tags %}
|
||||||
{% load static %}
|
{% load static %}
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html{% if rtl %} dir="rtl" class="rtl"{% endif %}>
|
<html{% if rtl %} dir="rtl" class="rtl"{% endif %}>
|
||||||
@@ -38,6 +39,20 @@
|
|||||||
</div>
|
</div>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
{% if request|is_hijacked %}
|
||||||
|
<div class="impersonate-warning">
|
||||||
|
<span class="fa fa-user-secret"></span>
|
||||||
|
{% blocktrans with user=request.user%}You are currently working on behalf of {{ user }}.{% endblocktrans %}
|
||||||
|
|
||||||
|
<form action="{% url 'control:users.impersonate.stop' %}" method="post" class="helper-display-inline">
|
||||||
|
{% csrf_token %}
|
||||||
|
<button class="btn btn-default btn-sm">
|
||||||
|
{% trans "Stop impersonating" %}
|
||||||
|
</button>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
<footer>
|
<footer>
|
||||||
|
|||||||
@@ -4,46 +4,51 @@
|
|||||||
{% load i18n %}
|
{% load i18n %}
|
||||||
{% block content %}
|
{% block content %}
|
||||||
{% if not error %}
|
{% if not error %}
|
||||||
<form class="form-signin" action="" method="post">
|
<form class="form-signin" action="" method="post">
|
||||||
<h3>{% trans "Authorize an application" %}</h3>
|
<h3>{% trans "Authorize an application" %}</h3>
|
||||||
|
|
||||||
{% csrf_token %}
|
{% csrf_token %}
|
||||||
{% for field in form %}
|
{% for field in form %}
|
||||||
{% if field.is_hidden %}
|
{% if field.is_hidden %}
|
||||||
{{ field }}
|
{{ field }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endfor %}
|
|
||||||
|
|
||||||
<p>
|
|
||||||
{% blocktrans trimmed with application=application.name %}
|
|
||||||
Do you really want to grant the application <strong>{{ application }}</strong> access to your
|
|
||||||
pretix account?
|
|
||||||
{% endblocktrans %}
|
|
||||||
</p>
|
|
||||||
<p>{% trans "The application requires the following permissions:" %}</p>
|
|
||||||
<ul>
|
|
||||||
{% for scope in scopes_descriptions %}
|
|
||||||
<li>{{ scope }}</li>
|
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ul>
|
|
||||||
{% if form.organizers %}
|
|
||||||
<p>{% trans "Please select the organizer accounts this application should get access to:" %}</p>
|
|
||||||
{% bootstrap_field form.organizers layout="inline" %}
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
{% bootstrap_form_errors form layout="control" %}
|
<p>
|
||||||
<p class="text-danger">
|
{% blocktrans trimmed with application=application.name %}
|
||||||
{% blocktrans trimmed %}
|
Do you really want to grant the application <strong>{{ application }}</strong> access to your
|
||||||
This application has <strong>not</strong> been reviewed by the pretix team. Granting access to your
|
pretix account?
|
||||||
pretix account happens at your own risk.
|
{% endblocktrans %}
|
||||||
{% endblocktrans %}
|
</p>
|
||||||
</p>
|
<p>
|
||||||
|
{% blocktrans trimmed with user=request.user %}
|
||||||
|
You are currently logged in as <strong>{{ user }}</strong>.
|
||||||
|
{% endblocktrans %}
|
||||||
|
</p>
|
||||||
|
<p>{% trans "The application requires the following permissions:" %}</p>
|
||||||
|
<ul>
|
||||||
|
{% for scope in scopes_descriptions %}
|
||||||
|
<li>{{ scope }}</li>
|
||||||
|
{% endfor %}
|
||||||
|
</ul>
|
||||||
|
{% if form.organizers %}
|
||||||
|
<p>{% trans "Please select the organizer accounts this application should get access to:" %}</p>
|
||||||
|
{% bootstrap_field form.organizers layout="inline" %}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
<div class="form-group buttons">
|
{% bootstrap_form_errors form layout="control" %}
|
||||||
<input type="submit" class="btn btn-large btn-default" value="Cancel"/>
|
<p class="text-danger">
|
||||||
<input type="submit" class="btn btn-large btn-primary" name="allow" value="Authorize"/>
|
{% blocktrans trimmed %}
|
||||||
</div>
|
This application has <strong>not</strong> been reviewed by the pretix team. Granting access to your
|
||||||
</form>
|
pretix account happens at your own risk.
|
||||||
|
{% endblocktrans %}
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<div class="form-group buttons">
|
||||||
|
<input type="submit" class="btn btn-large btn-default" value="Cancel"/>
|
||||||
|
<input type="submit" class="btn btn-large btn-primary" name="allow" value="Authorize"/>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
{% else %}
|
{% else %}
|
||||||
<form class="form-signin" action="" method="post">
|
<form class="form-signin" action="" method="post">
|
||||||
<h3>{% trans "Error:" %} {{ error.error }}</h3>
|
<h3>{% trans "Error:" %} {{ error.error }}</h3>
|
||||||
|
|||||||
@@ -56,5 +56,17 @@ footer {
|
|||||||
margin-bottom: 20px;
|
margin-bottom: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.impersonate-warning {
|
||||||
|
background-color: #ffe761;
|
||||||
|
background-image: -webkit-linear-gradient(-45deg, rgba(0, 0, 0, .04) 25%, transparent 25%, transparent 50%, rgba(0, 0, 0, .04) 50%, rgba(0, 0, 0, .04) 75%, transparent 75%, transparent);
|
||||||
|
background-image: -moz-linear-gradient(-45deg, rgba(0, 0, 0, .04) 25%, transparent 25%, transparent 50%, rgba(0, 0, 0, .04) 50%, rgba(0, 0, 0, .04) 75%, transparent 75%, transparent);
|
||||||
|
background-image: linear-gradient(135deg, rgba(0, 0, 0, .04) 25%, transparent 25%, transparent 50%, rgba(0, 0, 0, .04) 50%, rgba(0, 0, 0, .04) 75%, transparent 75%, transparent);
|
||||||
|
padding: 15px;
|
||||||
|
max-width: 330px;
|
||||||
|
box-shadow: 0 7px 14px 0 rgba(78, 50, 92, 0.1),0 3px 6px 0 rgba(0,0,0,.07);
|
||||||
|
margin: 15px auto;
|
||||||
|
border-radius: $border-radius-base;
|
||||||
|
}
|
||||||
|
|
||||||
@import "../../pretixbase/scss/_rtl.scss";
|
@import "../../pretixbase/scss/_rtl.scss";
|
||||||
@import "../../bootstrap/scss/_rtl.scss";
|
@import "../../bootstrap/scss/_rtl.scss";
|
||||||
|
|||||||
Reference in New Issue
Block a user