aboutsummaryrefslogtreecommitdiffstats
path: root/app/controllers/request_controller.rb
diff options
context:
space:
mode:
authorfrancis <francis>2008-08-31 16:02:25 +0000
committerfrancis <francis>2008-08-31 16:02:25 +0000
commitc6699784d8a00265786c7718d899534bd222bc74 (patch)
tree0f61db0e294388a5d414e45199f2a4cc065e32a4 /app/controllers/request_controller.rb
parent4025c1120f44191533cecca760d218ad60c80437 (diff)
Preview of followups.
Diffstat (limited to 'app/controllers/request_controller.rb')
-rw-r--r--app/controllers/request_controller.rb12
1 files changed, 9 insertions, 3 deletions
diff --git a/app/controllers/request_controller.rb b/app/controllers/request_controller.rb
index 017e08c5d..217863aa3 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.100 2008-08-31 12:46:15 francis Exp $
+# $Id: request_controller.rb,v 1.101 2008-08-31 16:02:25 francis Exp $
class RequestController < ApplicationController
@@ -293,7 +293,7 @@ class RequestController < ApplicationController
raise sprintf("Incoming message %d does not belong to request %d", @incoming_message.info_request_id, @info_request.id)
end
- if !params[:submitted_followup].nil?
+ if !params[:submitted_followup].nil? && !params[:reedit]
if @info_request.stop_new_responses
flash[:notice] = 'Your follow up has not been sent because this request has been stopped to prevent spam. Please <a href="/help/contact">contact us</a> if you really want to send a follow up message.'
else
@@ -301,7 +301,13 @@ class RequestController < ApplicationController
@outgoing_message.info_request = @info_request
if !@outgoing_message.valid?
render :action => 'show_response'
- elsif authenticated_as_user?(@info_request.user,
+ return
+ end
+ if params[:preview].to_i == 1
+ render :action => 'followup_preview'
+ return
+ end
+ if authenticated_as_user?(@info_request.user,
:web => "To send your follow up message about your FOI request",
:email => "Then your follow up message to " + @info_request.public_body.name + " will be sent.",
:email_subject => "Confirm your FOI follow up message to " + @info_request.public_body.name