mirror of
https://git.linux-kernel.at/oliver/ivatar.git
synced 2025-11-11 18:56:23 +00:00
Add error/failure templates and use full url for openid redirect
This commit is contained in:
22
templates/error.html
Normal file
22
templates/error.html
Normal file
@@ -0,0 +1,22 @@
|
||||
{% extends 'base.html' %}
|
||||
{% load i18n %}
|
||||
{% load static %}
|
||||
{% load bootstrap4 %}
|
||||
|
||||
{% block title %}Libravatar: {% trans 'Error!' %}{% endblock title %}
|
||||
|
||||
{% block content %}
|
||||
<h1 class="error">{% trans 'Error!' %}</h1>
|
||||
|
||||
<p>{% block errormessage %}{% trans 'Libravatar has encountered an error.' %}{% endblock errormessage %}</p>
|
||||
|
||||
<div style="height:40px"></div>
|
||||
|
||||
{% endblock content %}
|
||||
|
||||
{% block backlink %}
|
||||
{% if user.is_authenticated %}
|
||||
<p><a href="{% url 'profile' %}">{% trans 'Back to your profile' %}</a></p>
|
||||
{% endif %}
|
||||
|
||||
{% endblock %}
|
||||
6
templates/openid/failure.html
Normal file
6
templates/openid/failure.html
Normal file
@@ -0,0 +1,6 @@
|
||||
{% extends 'error.html' %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block errormessage %}
|
||||
{% trans 'OpenID error:' %} {{ message }}
|
||||
{% endblock errormessage %}
|
||||
@@ -28,7 +28,7 @@
|
||||
<input class="required openid" id="id_openid_identifier" size="70" maxlength="255" name="openid_identifier" value="{{ openid_identifier }}" type="text"></p>
|
||||
|
||||
<p><input type="submit" value="{% trans 'Login' %}" />
|
||||
<input type="hidden" name="next" value="{{ next }}" />
|
||||
<input type="hidden" name="next" value="{{ request.build_absolute_uri }}" />
|
||||
<a href="{% url 'home' %}">{% trans 'Cancel' %}</a></p>
|
||||
|
||||
</form>
|
||||
|
||||
Reference in New Issue
Block a user