summaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
authorJeremy Kerr <jk@ozlabs.org>2008-08-21 13:41:10 +0800
committerJeremy Kerr <jk@ozlabs.org>2008-08-21 13:41:10 +0800
commiteb6db921938c72c0655ca2e381818a471f99f5fa (patch)
tree9d66e6962f134d2116aacaeef3b3abe2177156ae /templates
parentecea8781acaa636186880d24351a6b712d4d3ce5 (diff)
downloadpatchwork-eb6db921938c72c0655ca2e381818a471f99f5fa.tar.bz2
patchwork-eb6db921938c72c0655ca2e381818a471f99f5fa.tar.xz
Implement confirmation emails.
To do this, we need to allow sucessive requests for the same confirmation URL. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Diffstat (limited to 'templates')
-rw-r--r--templates/patchwork/register.html11
-rw-r--r--templates/patchwork/register.mail11
-rw-r--r--templates/patchwork/user-link.html5
-rw-r--r--templates/patchwork/user-link.mail12
4 files changed, 32 insertions, 7 deletions
diff --git a/templates/patchwork/register.html b/templates/patchwork/register.html
index 8bd422e..4790fac 100644
--- a/templates/patchwork/register.html
+++ b/templates/patchwork/register.html
@@ -6,13 +6,12 @@
{% block body %}
-{% if request %}
+{% if request and not error %}
<p>Registration successful!</p>
- <p>email sent to {{ request.email }}</p>
- <p>Beta note: While we're testing, the confirmation email has been replaced
- by a single link:
- <a href="{% url patchwork.views.user.register_confirm key=request.key %}"
- >{% url patchwork.views.user.register_confirm key=request.key %}</a>
+ <p>A confirmation email has been sent to {{ request.email }}. You'll
+ need to visit the link provided in that email to confirm your
+ registration.</p>
+ <pre>{{email}}</pre>
</p>
{% else %}
<p>By creating a patchwork account, you can:<p>
diff --git a/templates/patchwork/register.mail b/templates/patchwork/register.mail
new file mode 100644
index 0000000..86dcd14
--- /dev/null
+++ b/templates/patchwork/register.mail
@@ -0,0 +1,11 @@
+Hi,
+
+This email is to confirm your account on the patchwork patch-tracking
+system. You can activate your account by visiting the url:
+
+ http://{{site.domain}}{% url patchwork.views.user.register_confirm key=request.key %}
+
+If you didn't request a user account on patchwork, then you can ignore
+this mail.
+
+Happy patchworking.
diff --git a/templates/patchwork/user-link.html b/templates/patchwork/user-link.html
index 3eeb527..588a999 100644
--- a/templates/patchwork/user-link.html
+++ b/templates/patchwork/user-link.html
@@ -6,7 +6,7 @@
{% block body %}
-{% if confirmation %}
+{% if confirmation and not error %}
<p>A confirmation email has been sent to {{ confirmation.email }}.</p>
<p>beta link: <a
@@ -19,6 +19,9 @@
<p>There was an error submitting your link request.</p>
{{ form.non_field_errors }}
{% endif %}
+ {% if error %}
+ <ul class="errorlist"><li>{{error}}</li></ul>
+ {% endif %}
<form action="{% url patchwork.views.user.link %}" method="post">
{{linkform.email.errors}}
diff --git a/templates/patchwork/user-link.mail b/templates/patchwork/user-link.mail
new file mode 100644
index 0000000..5f74d3b
--- /dev/null
+++ b/templates/patchwork/user-link.mail
@@ -0,0 +1,12 @@
+Hi,
+
+This email is to confirm that you own the email address:
+
+ {{ confirmation.email }}
+
+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 %}
+
+Happy patchworking.