aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--app/models/outgoing_message.rb13
-rw-r--r--app/views/request/_followup.rhtml9
2 files changed, 12 insertions, 10 deletions
diff --git a/app/models/outgoing_message.rb b/app/models/outgoing_message.rb
index 4d0a85087..0700857d8 100644
--- a/app/models/outgoing_message.rb
+++ b/app/models/outgoing_message.rb
@@ -56,6 +56,9 @@ class OutgoingMessage < ActiveRecord::Base
return "Yours faithfully,"
end
end
+ def get_internal_review_insert_here_note
+ return "GIVE DETAILS ABOUT YOUR COMPLAINT HERE"
+ end
def get_default_letter
if self.what_doing == 'internal_review'
"Please pass this on to the person who conducts Freedom of Information reviews." +
@@ -64,7 +67,7 @@ class OutgoingMessage < ActiveRecord::Base
self.info_request.public_body.name +
"'s handling of my FOI request " +
"'" + self.info_request.title + "'." +
- "\n\n" +
+ "\n\n\n\n [ " + self.get_internal_review_insert_here_note + " ] \n\n\n\n" +
"A full history of my FOI request and all correspondence is available on the Internet at this address:\n" +
"http://" + MySociety::Config.get("DOMAIN", '127.0.0.1:3000') + "/request/" + self.info_request.url_title
else
@@ -119,9 +122,13 @@ class OutgoingMessage < ActiveRecord::Base
# Check have edited letter
def validate
- if self.body.empty? || self.body =~ /\A#{get_salutation}\s+#{get_signoff}/
+ if self.body.empty? || self.body =~ /\A#{get_salutation}\s+#{get_signoff}/ || self.body =~ /#{get_internal_review_insert_here_note}/
if self.message_type == 'followup'
- errors.add(:body, "^Please enter your follow up message")
+ if self.what_doing == 'internal_review'
+ errors.add(:body, "^Please give details explaining why you want a review")
+ else
+ errors.add(:body, "^Please enter your follow up message")
+ end
elsif
errors.add(:body, "^Please enter your letter requesting information")
else
diff --git a/app/views/request/_followup.rhtml b/app/views/request/_followup.rhtml
index cffc57eeb..489696ed3 100644
--- a/app/views/request/_followup.rhtml
+++ b/app/views/request/_followup.rhtml
@@ -54,7 +54,7 @@
<% form_for(:outgoing_message, @outgoing_message, :html => { :id => 'followup_form' }, :url => incoming_message.nil? ? show_response_no_followup_url(:id => @info_request.id) : show_response_url(:id => @info_request.id, :incoming_message_id => incoming_message.id)) do |o| %>
<p>
- <%= o.text_area :body, :rows => 10, :cols => 55 %>
+ <%= o.text_area :body, :rows => 15, :cols => 55 %>
<br><script type="text/javascript">document.write('<input name="doSpell" type="button" value="Check spelling" onClick="openSpellChecker(document.getElementById(\'followup_form\').body);"/> (optional)')</script>
</p>
@@ -89,12 +89,7 @@
<% if @internal_review %>
<p>Edit and add <strong>more details</strong> to the message above,
- explaining why you would like a review.
- <ul>
- <li>Say that you are dissatisfied by their response</li>
- <li>Set out your reasons why</li>
- <li>Ask them to review their response</li>
- </ul>
+ explaining why you are dissatisfied with their response.
</p>
<% end %>