Refresh design for auth and error pages

This commit is contained in:
Raphael Michel
2019-01-18 17:14:24 +01:00
parent 7c4a1e5fb8
commit f37d265534
10 changed files with 155 additions and 103 deletions

View File

@@ -1,13 +1,17 @@
{% extends "error.html" %}
{% load i18n %}
{% load staticfiles %}
{% block title %}{% trans "Bad Request" %}{% endblock %}
{% block content %}
<i class="fa fa-frown-o big-icon"></i>
<h1>{% trans "Bad Request" %}</h1>
<p>{% trans "We were unable to parse your request." %}</p>
<p>{{ exception }}</p>
<p class="links">
<a id='goback' href='#'>{% trans "Take a step back" %}</a>
&middot; <a id='reload' href='#'>{% trans "Try again" %}</a>
</p>
<i class="fa fa-frown-o fa-fw big-icon"></i>
<div class="error-details">
<h1>{% trans "Bad Request" %}</h1>
<p>{% trans "We were unable to parse your request." %}</p>
<p>{{ exception }}</p>
<p class="links">
<a id='goback' href='#'>{% trans "Take a step back" %}</a>
&middot; <a id='reload' href='#'>{% trans "Try again" %}</a>
</p>
<img src="{% static "pretixbase/img/pretix-logo.svg" %}" class="logo"/>
</div>
{% endblock %}

View File

@@ -1,23 +1,27 @@
{% extends "error.html" %}
{% load i18n %}
{% load staticfiles %}
{% block title %}{% trans "Permission denied" %}{% endblock %}
{% block content %}
<i class="fa fa-lock big-icon"></i>
<h1>{% trans "Permission denied" %}</h1>
<p>{% trans "You do not have access to this page." %}</p>
<p>{{ exception }}</p>
<p class="links">
<a id='goback' href='#'>{% trans "Take a step back" %}</a>
&middot; <a id='reload' href='#'>{% trans "Try again" %}</a>
</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 %}
<i class="fa fa-fw fa-lock big-icon"></i>
<div class="error-details">
<h1>{% trans "Permission denied" %}</h1>
<p>{% trans "You do not have access to this page." %}</p>
<p>{{ exception }}</p>
<p class="links">
<a id='goback' href='#'>{% trans "Take a step back" %}</a>
&middot; <a id='reload' href='#'>{% trans "Try again" %}</a>
</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 %}
<img src="{% static "pretixbase/img/pretix-logo.svg" %}" class="logo"/>
</div>
{% endblock %}

View File

@@ -1,22 +1,26 @@
{% extends "error.html" %}
{% load i18n %}
{% load staticfiles %}
{% block title %}{% trans "Not found" %}{% endblock %}
{% block content %}
<i class="fa fa-meh-o big-icon"></i>
<h1>{% trans "Not found" %}</h1>
<p>{% trans "I'm afraid we could not find the the resource you requested." %}</p>
<p>{{ exception }}</p>
<p class="links">
<a id='goback' href='#'>{% trans "Take a step back" %}</a>
</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 %}
<i class="fa fa-meh-o fa-fw big-icon"></i>
<div class="error-details">
<h1>{% trans "Not found" %}</h1>
<p>{% trans "I'm afraid we could not find the the resource you requested." %}</p>
<p>{{ exception }}</p>
<p class="links">
<a id='goback' href='#'>{% trans "Take a step back" %}</a>
</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 %}
<img src="{% static "pretixbase/img/pretix-logo.svg" %}" class="logo"/>
</div>
{% endblock %}

View File

@@ -1,23 +1,27 @@
{% extends "error.html" %}
{% load i18n %}
{% load staticfiles %}
{% block title %}{% trans "Internal Server Error" %}{% endblock %}
{% block content %}
<i class="fa fa-bolt big-icon"></i>
<h1>{% trans "Internal Server Error" %}</h1>
<p>{% trans "We had trouble processing your request." %}</p>
<p>{% trans "If this problem persists, please contact us." %}</p>
{% if request.sentry.id %}
<p>
{% blocktrans trimmed %}
If you contact us, please send us the following code:
{% endblocktrans %}
<br>
{{ request.sentry.id }}
<i class="fa fa-bolt big-icon fa-fw"></i>
<div class="error-details">
<h1>{% trans "Internal Server Error" %}</h1>
<p>{% trans "We had trouble processing your request." %}</p>
<p>{% trans "If this problem persists, please contact us." %}</p>
{% if request.sentry.id %}
<p>
{% blocktrans trimmed %}
If you contact us, please send us the following code:
{% endblocktrans %}
<br>
{{ request.sentry.id }}
</p>
{% endif %}
<p>{{ exception }}</p>
<p class="links">
<a id='goback' href='#'>{% trans "Take a step back" %}</a>
&middot; <a id='reload' href='#'>{% trans "Try again" %}</a>
</p>
{% endif %}
<p>{{ exception }}</p>
<p class="links">
<a id='goback' href='#'>{% trans "Take a step back" %}</a>
&middot; <a id='reload' href='#'>{% trans "Try again" %}</a>
</p>
<img src="{% static "pretixbase/img/pretix-logo.svg" %}" class="logo"/>
</div>
{% endblock %}

View File

@@ -1,24 +1,30 @@
{% extends "error.html" %}
{% load i18n %}
{% load staticfiles %}
{% block title %}{% trans "Verification failed" %}{% endblock %}
{% block content %}
<i class="fa fa-frown-o big-icon"></i>
<h1>{% trans "Verification failed" %}</h1>
<p>{% blocktrans trimmed %}
We could not verify that this request really was sent from you. For security reasons, we therefore cannot process it.
{% endblocktrans %}</p>
{% if no_referer %}
<p>{{ no_referer1 }}</p>
<p>{{ no_referer2 }}</p>
{% elif no_cookie %}
<p>{{ no_cookie1 }}</p>
<p>{{ no_cookie2 }}</p>
{% else %}
<i class="fa fa-frown-o big-icon fa-fw"></i>
<div class="error-details">
<h1>{% trans "Verification failed" %}</h1>
<p>{% blocktrans trimmed %}
Please go back to the last page, refresh this page and then try again. If the problem persists, please get in touch with us.
We could not verify that this request really was sent from you. For security reasons, we therefore cannot
process it.
{% endblocktrans %}</p>
{% endif %}
<p class="links">
<a id='goback' href='#'>{% trans "Take a step back" %}</a>
</p>
{% if no_referer %}
<p>{{ no_referer1 }}</p>
<p>{{ no_referer2 }}</p>
{% elif no_cookie %}
<p>{{ no_cookie1 }}</p>
<p>{{ no_cookie2 }}</p>
{% else %}
<p>{% blocktrans trimmed %}
Please go back to the last page, refresh this page and then try again. If the problem persists, please
get in touch with us.
{% endblocktrans %}</p>
{% endif %}
<p class="links">
<a id='goback' href='#'>{% trans "Take a step back" %}</a>
</p>
<img src="{% static "pretixbase/img/pretix-logo.svg" %}" class="logo"/>
</div>
{% endblock %}

View File

@@ -1,6 +1,6 @@
{% load compress %}
{% load i18n %}
{% load static %}
{% load staticfiles %}
<!DOCTYPE html>
<html>
<head>
@@ -16,6 +16,6 @@
<div class="container">
{% block content %}{% endblock %}
</div>
<script src="{% static "pretixbase/js/errors.js" %}"></script>
</body>
<script src="{% static "pretixbase/js/errors.js" %}"></script>
</html>