aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--app/controllers/user_controller.rb14
-rw-r--r--app/views/user/bad_token.rhtml12
-rw-r--r--public/stylesheets/main.css2
-rw-r--r--todo.txt2
4 files changed, 18 insertions, 12 deletions
diff --git a/app/controllers/user_controller.rb b/app/controllers/user_controller.rb
index cf412c473..7f076bfb2 100644
--- a/app/controllers/user_controller.rb
+++ b/app/controllers/user_controller.rb
@@ -4,7 +4,7 @@
# Copyright (c) 2007 UK Citizens Online Democracy. All rights reserved.
# Email: francis@mysociety.org; WWW: http://www.mysociety.org/
#
-# $Id: user_controller.rb,v 1.19 2007-11-19 12:36:57 francis Exp $
+# $Id: user_controller.rb,v 1.20 2007-12-14 13:42:28 francis Exp $
class UserController < ApplicationController
# XXX See controllers/application.rb simplify_url_part for reverse of expression in SQL below
@@ -66,14 +66,10 @@ class UserController < ApplicationController
def confirm
post_redirect = PostRedirect.find_by_email_token(params[:email_token])
- # XXX add message like this if post_redirect not found
- # err(sprintf(_("Please check the URL (i.e. the long code of
- # letters and numbers) is copied correctly from your email. If
- # you can't click on it in the email, you'll have to select and
- # copy it from the email. Then paste it into your browser, into
- # the place you would type the address of any other webpage.
- # Technical details: The token '%s' wasn't found."), $q_t));
- #
+ if post_redirect.nil?
+ render 'user/bad_token'
+ return
+ end
@user = post_redirect.user
@user.email_confirmed = true
diff --git a/app/views/user/bad_token.rhtml b/app/views/user/bad_token.rhtml
new file mode 100644
index 000000000..d47a3c8bd
--- /dev/null
+++ b/app/views/user/bad_token.rhtml
@@ -0,0 +1,12 @@
+<p id="bad_token">
+Please check the URL (i.e. the long code of letters and numbers) is copied
+correctly from your email.
+</p>
+
+<p id="bad_token">
+If you can't click on it in the email, you'll have
+to select and copy it from the email. Then paste it into your browser, into
+the place you would type the address of any other webpage.
+</p>
+
+
diff --git a/public/stylesheets/main.css b/public/stylesheets/main.css
index 7e8e7a0fa..4c4d76ac0 100644
--- a/public/stylesheets/main.css
+++ b/public/stylesheets/main.css
@@ -296,7 +296,7 @@ table#list_requests .odd {
margin-left: 8.5em;
}
-#sign_in_reason {
+#sign_in_reason, #bad_token {
font-weight: bold;
text-align: center;
font-size: 125%;
diff --git a/todo.txt b/todo.txt
index d86d3eeee..a1208550a 100644
--- a/todo.txt
+++ b/todo.txt
@@ -7,8 +7,6 @@ Next
Either rotate log files, or merge with Apache ones
-Check confirmed everywhere in password check etc.
-
Rename classify to /request/single_response or something?
Send email to requestor telling them new information has come in