aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--app/controllers/request_controller.rb1
-rw-r--r--app/views/request/new.html.erb8
-rw-r--r--app/views/request/preview.html.erb8
3 files changed, 14 insertions, 3 deletions
diff --git a/app/controllers/request_controller.rb b/app/controllers/request_controller.rb
index 5a4ec58a0..d56b5d245 100644
--- a/app/controllers/request_controller.rb
+++ b/app/controllers/request_controller.rb
@@ -187,7 +187,6 @@ class RequestController < ApplicationController
if params[:public_body_ids].blank?
redirect_to select_authorities_path and return
end
- # TODO: Pass public bodies list through new and preview template forms
# TODO: I don't think batch requesters should be subject to rate limits,
# but I do think we should probably check for double submission of batch
diff --git a/app/views/request/new.html.erb b/app/views/request/new.html.erb
index cce6c1397..91171da3e 100644
--- a/app/views/request/new.html.erb
+++ b/app/views/request/new.html.erb
@@ -144,7 +144,13 @@
</p>
<div class="form_button">
- <%= f.hidden_field(:public_body_id, { :value => @info_request.public_body_id } ) %>
+ <% if @batch %>
+ <% params[:public_body_ids].each do |public_body_id| %>
+ <%= hidden_field_tag("public_body_ids[]", public_body_id)%>
+ <% end %>
+ <% else %>
+ <%= f.hidden_field(:public_body_id, { :value => @info_request.public_body_id } ) %>
+ <% end %>
<%= hidden_field_tag(:submitted_new_request, 1 ) %>
<%= hidden_field_tag(:preview, 1 ) %>
<%= submit_tag _("Preview your public request") %>
diff --git a/app/views/request/preview.html.erb b/app/views/request/preview.html.erb
index a5c9a8a60..0265d0328 100644
--- a/app/views/request/preview.html.erb
+++ b/app/views/request/preview.html.erb
@@ -41,7 +41,13 @@
<p>
<%= f.hidden_field(:title) %>
- <%= f.hidden_field(:public_body_id, { :value => @info_request.public_body_id } ) %>
+ <% if @batch %>
+ <% params[:public_body_ids].each do |public_body_id| %>
+ <%= hidden_field_tag("public_body_ids[]", public_body_id)%>
+ <% end %>
+ <% else %>
+ <%= f.hidden_field(:public_body_id, { :value => @info_request.public_body_id } ) %>
+ <% end %>
<%= f.hidden_field(:tag_string) %>
<%= hidden_field_tag(:submitted_new_request, 1) %>
<%= hidden_field_tag(:preview, 0 ) %>