summaryrefslogtreecommitdiffstats
path: root/templates/patchwork
diff options
context:
space:
mode:
authorJeremy Kerr <jk@ozlabs.org>2010-08-12 12:15:48 +0800
committerJeremy Kerr <jk@ozlabs.org>2011-04-14 16:44:53 +0800
commit56e2243f3be7e859666ce0e4e1a8b8b94444f8d4 (patch)
tree7d3cf84b990a1b732d0334c5520f3203a955df12 /templates/patchwork
parentc3291f5d18445cd91b540342d31d76254b32376c (diff)
downloadpatchwork-56e2243f3be7e859666ce0e4e1a8b8b94444f8d4.tar.bz2
patchwork-56e2243f3be7e859666ce0e4e1a8b8b94444f8d4.tar.xz
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 <jk@ozlabs.org>
Diffstat (limited to 'templates/patchwork')
-rw-r--r--templates/patchwork/confirm-error.html19
-rw-r--r--templates/patchwork/user-link.mail2
2 files changed, 20 insertions, 1 deletions
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' %}
+<p>This confirmation has already been processed; you've probably visited this
+page before.</p>
+{% endif %}
+
+{% if error == 'expired' %}
+<p>The confirmation has expired. If you'd still like to perform the
+{{conf.get_type_display}} process, you'll need to resubmit the request.</p>
+{% 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.