diff options
author | Louise Crow <louise.crow@gmail.com> | 2013-10-23 11:51:04 +0100 |
---|---|---|
committer | Louise Crow <louise.crow@gmail.com> | 2013-12-04 09:32:41 +0000 |
commit | d9c42b52789743b6687c49d8457ec5ed1a8b21e3 (patch) | |
tree | 691a05f12544398962ce3c49d743f0bd2d9e8c96 /app/views | |
parent | 0aba4dcbcb19be2c2c66e40f051ae9c4e0283b6e (diff) |
Pass public bodies list through forms.
Diffstat (limited to 'app/views')
-rw-r--r-- | app/views/request/new.html.erb | 8 | ||||
-rw-r--r-- | app/views/request/preview.html.erb | 8 |
2 files changed, 14 insertions, 2 deletions
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 ) %> |