datatracker/ietf/templates/registration/confirm_new_email.html
Jennifer Richards c6fbdef6df
fix: Handle integrity violations when confirming email address (#5506)
* fix: Handle integrity violations when confirming email address

* test: Add tests of confirm_new_email view
2023-04-23 17:58:05 -05:00

36 lines
1.6 KiB
HTML

{% extends "base.html" %}
{# Copyright The IETF Trust 2015, All Rights Reserved #}
{% load origin django_bootstrap5 textfilters %}
{% block title %}Confirm new email address{% endblock %}
{% block content %}
{% origin %}
<h1>Confirm new email address</h1>
{% if not can_confirm %}
<p class="alert alert-danger my-3">
An error has occurred when attempting to add the email address {{ email|linkify }} to your account {{ username }}.
</p>
{% bootstrap_form_errors form %}
<a class="btn btn-primary my-3"
href="{% url "ietf.ietfauth.views.profile" %}">Edit profile</a>
{% elif new_email_obj %}
{% if already_confirmed %}
<p class="alert alert-info my-3">
Your account {{ username }} already includes the email address {{ email|linkify }}.
</p>
{% else %}
<p class="alert alert-success my-3">
Your account {{ username }} has been updated to include the email address {{ email|linkify }}.
</p>
{% endif %}
<a class="btn btn-primary my-3"
href="{% url "ietf.ietfauth.views.profile" %}">Edit profile</a>
{% else %}
<p class="alert alert-info my-3">
Confirm that you want to add the email address {{ email|linkify }} to your account {{ username }}.
</p>
<form method="post" class="my-3">
{% csrf_token %}
<button type="submit" class="btn btn-warning" name="action" value="confirm">Confirm email address</button>
</form>
{% endif %}
{% endblock %}