forked from CGM_Public/pretix_original
Allow to switch to admin mode on 404 and 403 page
This commit is contained in:
@@ -10,4 +10,14 @@
|
|||||||
<a id='goback' href='#'>{% trans "Take a step back" %}</a>
|
<a id='goback' href='#'>{% trans "Take a step back" %}</a>
|
||||||
· <a id='reload' href='#'>{% trans "Try again" %}</a>
|
· <a id='reload' href='#'>{% trans "Try again" %}</a>
|
||||||
</p>
|
</p>
|
||||||
|
{% if request.user.is_staff and not staff_session %}
|
||||||
|
<form action="{% url 'control:user.sudo' %}?next={{ request.path|urlencode }}" method="post">
|
||||||
|
<p>
|
||||||
|
{% csrf_token %}
|
||||||
|
<button type="submit" class="btn btn-default" id="button-sudo">
|
||||||
|
<i class="fa fa-id-card"></i> {% trans "Admin mode" %}
|
||||||
|
</button>
|
||||||
|
</p>
|
||||||
|
</form>
|
||||||
|
{% endif %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|||||||
@@ -9,4 +9,14 @@
|
|||||||
<p class="links">
|
<p class="links">
|
||||||
<a id='goback' href='#'>{% trans "Take a step back" %}</a>
|
<a id='goback' href='#'>{% trans "Take a step back" %}</a>
|
||||||
</p>
|
</p>
|
||||||
|
{% if request.user.is_staff and not staff_session %}
|
||||||
|
<form action="{% url 'control:user.sudo' %}?next={{ request.path|urlencode }}" method="post">
|
||||||
|
<p>
|
||||||
|
{% csrf_token %}
|
||||||
|
<button type="submit" class="btn btn-default" id="button-sudo">
|
||||||
|
<i class="fa fa-id-card"></i> {% trans "Admin mode" %}
|
||||||
|
</button>
|
||||||
|
</p>
|
||||||
|
</form>
|
||||||
|
{% endif %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|||||||
Reference in New Issue
Block a user