aboutsummaryrefslogtreecommitdiffstats
path: root/app/views
diff options
context:
space:
mode:
Diffstat (limited to 'app/views')
-rw-r--r--app/views/request/new.rhtml5
-rw-r--r--app/views/request/preview.rhtml32
2 files changed, 35 insertions, 2 deletions
diff --git a/app/views/request/new.rhtml b/app/views/request/new.rhtml
index 18f719264..2bf80eb1b 100644
--- a/app/views/request/new.rhtml
+++ b/app/views/request/new.rhtml
@@ -69,8 +69,9 @@
<div class="form_button">
<%= f.hidden_field(:public_body_id, { :value => @info_request.public_body_id } ) %>
- <%= hidden_field_tag(:submitted_new_request, { :value => 1 } ) %>
- <%= submit_tag "Make public Freedom of Information request >>" %>
+ <%= hidden_field_tag(:submitted_new_request, 1 ) %>
+ <%= hidden_field_tag(:preview, 1 ) %>
+ <%= submit_tag "Preview your public request" %>
</div>
<% end %>
diff --git a/app/views/request/preview.rhtml b/app/views/request/preview.rhtml
new file mode 100644
index 000000000..7104d65a5
--- /dev/null
+++ b/app/views/request/preview.rhtml
@@ -0,0 +1,32 @@
+<% @title = "Preview new FOI request to '" + h(@info_request.public_body.name) + "'" %>
+
+<% form_for(:info_request, @info_request, :html => { :id => 'preview_form' } ) do |f| %>
+
+ <h1>Preview your request</h1>
+
+ <%= f.hidden_field(:title) %>
+
+ <% fields_for :outgoing_message do |o| %>
+ <p class="outgoing_message_preview">
+ <strong>To:</strong> <%=h @info_request.public_body.name %>
+ <br><strong>Subject:</strong> <%=h @info_request.title %>
+ <br><br>
+ <%= @outgoing_message.get_body_for_html_preview %>
+ <%= o.hidden_field(:body) %>
+ </p>
+ <% end %>
+
+ <strong>Note:</strong> Your request and any response will be
+ displayed publically on this website.
+
+ <p>
+ <%= f.hidden_field(:public_body_id, { :value => @info_request.public_body_id } ) %>
+ <%= hidden_field_tag(:submitted_new_request, 1) %>
+ <%= hidden_field_tag(:preview, 0 ) %>
+ <%= submit_tag "Re-edit this request", :name => 'reedit' %>
+ <%= submit_tag "Send Freedom of Information request", :name => 'submit' %>
+ </p>
+
+<% end %>
+
+