Skip to content

Commit 71c6d90

Browse files
committed
feat: Redesign email confirm page
1 parent 888e6da commit 71c6d90

File tree

2 files changed

+26
-21
lines changed

2 files changed

+26
-21
lines changed
7.44 KB
Loading
Lines changed: 26 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,33 @@
11
{% extends "account/base.html" %}
22

3-
{% load i18n %}
4-
{% load account %}
3+
{% load account static %}
54

6-
{% block head_title %}{% trans "Confirm E-mail Address" %}{% endblock %}
7-
8-
{% block content_header %}{% trans "Confirm E-mail Address" %}{% endblock %}
5+
{% block head_title %}Confirm E-mail Address{% endblock %}
96

7+
{% block header %}{% endblock %}
108
{% block content %}
11-
{% if confirmation %}
12-
{% user_display confirmation.email_address.user as user_display %}
13-
<p>{% blocktrans with confirmation.email_address.email as email %}Please confirm that <a href="mailto:{{ email }}">{{ email }}</a> is an e-mail address for user {{ user_display }}.{% endblocktrans %}</p>
14-
15-
<form method="post" action="{% url 'account_confirm_email' confirmation.key %}">
16-
{% csrf_token %}
17-
<button type="submit">{% trans 'Confirm' %}</button>
18-
</form>
19-
20-
{% else %}
21-
22-
{% url 'account_email' as email_url %}
23-
24-
<p>{% blocktrans %}This e-mail confirmation link expired or is invalid. Please <a href="{{ email_url}}">issue a new e-mail confirmation request</a>.{% endblocktrans %}</p>
25-
26-
{% endif %}
9+
<div class="w-[40rem] flex flex-col items-center justify-center mx-auto p-8 font-common shadow-sign-content rounded-lg">
10+
<h3>Confirm E-mail Address</h3>
11+
{% if confirmation %}
12+
{% with email=confirmation.email_address.email %}
13+
{% if can_confirm %}
14+
{% user_display confirmation.email_address.user as user_display %}
15+
<p class="text-center my-2">Please confirm that <a class="underline" href="mailto:{{ email }}">{{ email }}</a> is an email address for user {{ user_display }}.</p>
16+
<form class="my-2" method="post" action="{% url 'account_confirm_email' confirmation.key %}">
17+
{% csrf_token %}
18+
<button class="button" type="submit">Confirm</button>
19+
</form>
20+
{% else %}
21+
<img class="w-42" src="{% static 'img/problem.png' %}">
22+
<p class="my-2 text-center">Unable to confirm <a class="underline" href="mailto:{{ email }}">{{ email }}</a> because it is already confirmed by a different account.</p>
23+
{% endif %}
24+
{% endwith %}
25+
{% else %}
26+
<img src="{% static 'img/email_verification_expired.png' %}">
27+
<p class="text-center">This email confirmation link expired or is invalid. Would you like to request a new email confirmation?</p>
28+
<a href="{% url 'account_email' %}" class="button">New Email Confirmation</a>
29+
{% endif %}
30+
</div>
2731

2832
{% endblock %}
33+
{% block footer %}{% endblock %}

0 commit comments

Comments
 (0)