From 56e2243f3be7e859666ce0e4e1a8b8b94444f8d4 Mon Sep 17 00:00:00 2001 From: Jeremy Kerr Date: Thu, 12 Aug 2010 12:15:48 +0800 Subject: Use generic email confirmation object Rather than having a UserPerson-specific confirmation, add an EmailConfirmation object to allow multiple types of confirmations (eg, opt-out requests in future). To do this, we use a view (patchwork.views.confirm) that will call the type-specific view with the confirmation object. Also, add tests to check that the User/Person linkage system works. Signed-off-by: Jeremy Kerr --- templates/patchwork/confirm-error.html | 19 +++++++++++++++++++ templates/patchwork/user-link.mail | 2 +- 2 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 templates/patchwork/confirm-error.html (limited to 'templates') diff --git a/templates/patchwork/confirm-error.html b/templates/patchwork/confirm-error.html new file mode 100644 index 0000000..81292e2 --- /dev/null +++ b/templates/patchwork/confirm-error.html @@ -0,0 +1,19 @@ +{% extends "base.html" %} + +{% block title %}Confirmation{% endblock %} +{% block heading %}Confirmation{% endblock %} + + +{% block body %} + +{% if error == 'inactive' %} +

This confirmation has already been processed; you've probably visited this +page before.

+{% endif %} + +{% if error == 'expired' %} +

The confirmation has expired. If you'd still like to perform the +{{conf.get_type_display}} process, you'll need to resubmit the request.

+{% endif %} + +{% endblock %} diff --git a/templates/patchwork/user-link.mail b/templates/patchwork/user-link.mail index 5f74d3b..c483181 100644 --- a/templates/patchwork/user-link.mail +++ b/templates/patchwork/user-link.mail @@ -7,6 +7,6 @@ This email is to confirm that you own the email address: So that you can add it to your patchwork profile. You can confirm this email address by visiting the url: - http://{{site.domain}}{% url patchwork.views.user.link_confirm key=confirmation.key %} + http://{{site.domain}}{% url patchwork.views.confirm key=confirmation.key %} Happy patchworking. -- cgit v1.2.3