From 0d78ef90a85d11a0bd5d9c092292c829968470ab Mon Sep 17 00:00:00 2001
From: Matthew Landauer
+ Reporting a request notifies the site administrators. They will respond as soon as possible.
+ Why specifically do you consider this request unsuitable?
+
+ <%= 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" %>
+
+
+ <%= text_area_tag :message, "", :rows => 10, :cols => 60 %>
+
- Reporting a request notifies the site administrators. They will respond as soon as possible.
- Why specifically do you consider this request unsuitable?
-
- <%= 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" %>
- <%= _("This request has already been reported for administrator attention") %>
-
- <%= text_area_tag :message, "", :rows => 10, :cols => 60 %>
+ Reporting a request notifies the site administrators. They will respond as soon as possible.
Why specifically do you consider this request unsuitable?
+
+ <%= 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" %>
+
+
+ <%= text_area_tag :message, "", :rows => 10, :cols => 60 %>
+ <%= _('Requests for personal information and vexatious requests are not considered valid for FOI purposes (read more).') %> <%= _('If you believe this request is not suitable, you can report it for attention by the site administrators') %> <%= _('Requests for personal information and vexatious requests are not considered valid for FOI purposes (read more).') %> <%= _('If you believe this request is not suitable, you can report it for attention by the site administrators') %>Report request: <%= @info_request.title %>
+
+Report request: <%= @info_request.title %>
-<%= _("Act on what you've learnt") %>
--
cgit v1.2.3
From 661ad52ef88de7afcbd7820d8283057764f4d1ac Mon Sep 17 00:00:00 2001
From: Matthew Landauer <%= _("Act on what you've learnt") %>
diff --git a/app/views/request/new_report_request.html.erb b/app/views/request/new_report_request.html.erb
index 4ac110f80..11b682282 100644
--- a/app/views/request/new_report_request.html.erb
+++ b/app/views/request/new_report_request.html.erb
@@ -8,7 +8,7 @@
Why specifically do you consider this request unsuitable?
- <%= form_tag report_path(:url_title => @info_request.url_title) do %> + <%= form_tag request_report_path(:url_title => @info_request.url_title) do %>
<%= 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" %>
diff --git a/config/routes.rb b/config/routes.rb
index 4869990e3..c3e512b9d 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -59,8 +59,8 @@ Alaveteli::Application.routes.draw do
match '/upload/request/:url_title' => 'request#upload_response', :as => :upload_response
match '/request/:url_title/download' => 'request#download_entire_request', :as => :download_entire_request
- match '/request/:url_title/report' => 'request#report_request', :as => :report, :via => :post
- match '/request/:url_title/report/new' => 'request#new_report_request', :as => :new_report_request
+ match '/request/:url_title/report' => 'request#report_request', :as => :request_report, :via => :post
+ match '/request/:url_title/report/new' => 'request#new_report_request', :as => :new_request_report
####
#### User controller
--
cgit v1.2.3
From 5fbb8f4357fd759cadfa0191694d3bad49d86a90 Mon Sep 17 00:00:00 2001
From: Matthew Landauer <%= _("This request has already been reported for administrator attention") %>
+ Reporting a request notifies the site administrators. They will respond as soon as possible.
+ Why specifically do you consider this request unsuitable?
+
+ <%= 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" %>
+
+
+ <%= text_area_tag :message, "", :rows => 10, :cols => 60 %>
+ <%= _("This request has already been reported for administrator attention") %>
- Reporting a request notifies the site administrators. They will respond as soon as possible.
- Why specifically do you consider this request unsuitable?
-
- <%= 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" %>
-
-
- <%= text_area_tag :message, "", :rows => 10, :cols => 60 %>
- <%= _("This request has already been reported for administrator attention") %>
+ Reporting a request notifies the site administrators. They will respond as soon as possible.
+ Why specifically do you consider this request unsuitable?
+
+ <%= 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" %>
+
+
+ <%= text_area_tag :message, "", :rows => 10, :cols => 60 %>
+ <%= _("This request has already been reported for administrator attention") %>
- Reporting a request notifies the site administrators. They will respond as soon as possible.
- Why specifically do you consider this request unsuitable?
-
- <%= 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" %>
-
-
- <%= text_area_tag :message, "", :rows => 10, :cols => 60 %>
- Report request: <%= @info_request.title %>
+
+<% if @info_request.attention_requested %>
+ Report request: <%= @info_request.title %>
-
-<% if @info_request.attention_requested %>
- Report request: <%= @info_request.title %>
+
+<% if @info_request.attention_requested %>
+ Report request: <%= @info_request.title %>
-
-<% if @info_request.attention_requested %>
-
Why specifically do you consider this request unsuitable?
- <%= form_tag request_report_path(:url_title => @info_request.url_title) do %> + <%= form_tag request_report_path(:request_id => @info_request.url_title) do %><%= 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" %> diff --git a/app/views/request/_sidebar.html.erb b/app/views/request/_sidebar.html.erb index 03185c44b..302172555 100644 --- a/app/views/request/_sidebar.html.erb +++ b/app/views/request/_sidebar.html.erb @@ -25,7 +25,7 @@ <% else %>
<%= _('Requests for personal information and vexatious requests are not considered valid for FOI purposes (read more).') %>
<%= _('If you believe this request is not suitable, you can report it for attention by the site administrators') %>
- <%= link_to _("Report this request"), new_request_report_path(:url_title => @info_request.url_title) %> + <%= link_to _("Report this request"), new_request_report_path(:request_id => @info_request.url_title) %> <% end %> <% end %>- <%= 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" %>
diff --git a/spec/views/reports/new.erb_spec.rb b/spec/views/reports/new.erb_spec.rb
index 3045d135d..66b738261 100644
--- a/spec/views/reports/new.erb_spec.rb
+++ b/spec/views/reports/new.erb_spec.rb
@@ -1,7 +1,7 @@
require File.expand_path(File.join('..', '..', '..', 'spec_helper'), __FILE__)
describe 'reports/new.html.erb' do
- let(:info_request) { mock_model(InfoRequest, :url_title => "foo") }
+ let(:info_request) { mock_model(InfoRequest, :url_title => "foo", :report_reasons => ["Weird"]) }
before :each do
assign(:info_request, info_request)
end
--
cgit v1.2.3
From 8c5a1ba9ed8a3d30564a178926a2729b9e9931d7 Mon Sep 17 00:00:00 2001
From: Matthew Landauer
- <%= select_tag :reason, options_for_select(@info_request.report_reasons), :prompt => "Choose a reason" %>
+ <%= select_tag :reason, options_for_select(@info_request.report_reasons, @reason), :prompt => "Choose a reason" %>
- <%= text_area_tag :message, "", :rows => 10, :cols => 60 %>
+ <%= text_area_tag :message, @message, :rows => 10, :cols => 60 %>