diff options
author | francis <francis> | 2008-05-27 08:56:27 +0000 |
---|---|---|
committer | francis <francis> | 2008-05-27 08:56:27 +0000 |
commit | bc2267d366f627ab7208273b2ece2af1b847c086 (patch) | |
tree | 35e4ad733f24c6dcf4ad8e2f235a3aead43d6049 /app/controllers/request_controller.rb | |
parent | 00ecb3cb581e0952de82c43ce51ae51c1bcb7f09 (diff) |
Warning about postcodes or emails appearing in outgoing requests.
Diffstat (limited to 'app/controllers/request_controller.rb')
-rw-r--r-- | app/controllers/request_controller.rb | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/app/controllers/request_controller.rb b/app/controllers/request_controller.rb index 71a6e66f1..1c9c36f74 100644 --- a/app/controllers/request_controller.rb +++ b/app/controllers/request_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: request_controller.rb,v 1.92 2008-05-27 01:19:44 francis Exp $ +# $Id: request_controller.rb,v 1.93 2008-05-27 08:56:27 francis Exp $ class RequestController < ApplicationController @@ -123,6 +123,19 @@ class RequestController < ApplicationController # Show preview page, if it is a preview if params[:preview].to_i == 1 + message = "" + if @outgoing_message.contains_email? + message += "Your request contains an <strong>email address</strong>. Unless it directly relates to the subject of your request, you should remove it, as it will <strong>appear publically on the Internet</strong>."; + end + if @outgoing_message.contains_postcode? + if not message.empty? + message += "<br><br>" + end + message += "Your request contains a <strong>postcode</strong>. Unless it directly relates to the subject of your request, please remove any address as it will <strong>appear publically on the Internet</strong>."; + end + if not message.empty? + flash[:notice] = message + end render :action => 'preview' return end |