aboutsummaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
Diffstat (limited to 'app')
-rw-r--r--app/models/info_request.rb6
-rw-r--r--app/views/reports/new.html.erb2
2 files changed, 7 insertions, 1 deletions
diff --git a/app/models/info_request.rb b/app/models/info_request.rb
index f63c10e0a..68b837c7d 100644
--- a/app/models/info_request.rb
+++ b/app/models/info_request.rb
@@ -108,6 +108,12 @@ class InfoRequest < ActiveRecord::Base
states
end
+ # Possible reasons that a request could be reported for administrator attention
+ def report_reasons
+ ["Contains defamatory material", "Not a valid request", "Request for personal information",
+ "Contains personal information", "Vexatious", "Other"]
+ end
+
def must_be_valid_state
errors.add(:described_state, "is not a valid state") if
!InfoRequest.enumerate_states.include? described_state
diff --git a/app/views/reports/new.html.erb b/app/views/reports/new.html.erb
index 58e80f3ad..b5ca1421f 100644
--- a/app/views/reports/new.html.erb
+++ b/app/views/reports/new.html.erb
@@ -11,7 +11,7 @@
<%= form_tag request_report_path(:request_id => @info_request.url_title) do %>
<p>
<label class="form_label" for="reason">Reason:</label>
- <%= select_tag :reason, options_for_select(["Contains defamatory material", "Not a valid request", "Request for personal information", "Contains personal information", "Vexatious", "Other"]), :prompt => "Choose a reason" %>
+ <%= select_tag :reason, options_for_select(@info_request.report_reasons), :prompt => "Choose a reason" %>
</p>
<p>
<label class="form_label" for="message">Please tell us more:</label>