aboutsummaryrefslogtreecommitdiffstats
path: root/app/views
diff options
context:
space:
mode:
Diffstat (limited to 'app/views')
-rw-r--r--app/views/request/_followup.rhtml62
-rw-r--r--app/views/request/followup_preview.rhtml20
2 files changed, 51 insertions, 31 deletions
diff --git a/app/views/request/_followup.rhtml b/app/views/request/_followup.rhtml
index 138503a30..3839f0869 100644
--- a/app/views/request/_followup.rhtml
+++ b/app/views/request/_followup.rhtml
@@ -1,11 +1,16 @@
<div id="followup">
- <% if incoming_message.nil? || !incoming_message.valid_to_reply_to? %>
+ <% if @internal_review %>
+ <h1>Request an internal review
+ from <%=h RequestMailer.name_for_followup(@info_request, nil) %>
+ </h1>
+ <% elsif incoming_message.nil? || !incoming_message.valid_to_reply_to? %>
<h2>Send a public follow up message
- to '<%=h RequestMailer.name_for_followup(@info_request, nil) %>'
+ to <%=h RequestMailer.name_for_followup(@info_request, nil) %>
</h2>
<% else %>
- <h2>Send a public reply to <%=h RequestMailer.name_for_followup(@info_request, incoming_message) %>
+ <h2>Send a public reply to
+ <%=h RequestMailer.name_for_followup(@info_request, incoming_message) %>
</h2>
<% end %>
@@ -45,35 +50,42 @@
<br><script type="text/javascript">document.write('<input name="doSpell" type="button" value="Check spelling" onClick="openSpellChecker(document.getElementById(\'followup_form\').body);"/> (optional)')</script>
</p>
- <h3>What are you doing?</h3>
-
- <% if !@outgoing_message.errors[:what_doing_dummy].nil? %>
- <div class="fieldWithErrors">
+ <% if @internal_review %>
+ <%= hidden_field_tag "outgoing_message[what_doing]", "internal_review" %>
<% else %>
- <div>
- <% end %>
- <!--
- <div>
- <%= radio_button "outgoing_message", "what_doing", "new_information", :id => "new_information" %>
- <label for="new_information">I am asking for <strong>new information</strong> </label>
- </div>
- -->
- <div>
- <%= radio_button "outgoing_message", "what_doing", "internal_review", :id => "internal_review" %>
- <label for="internal_review">I am requesting an <strong>internal review</strong>
- (<a href="/help/unhappy">what's that?</a>)
- </label>
- </div>
+ <h3>What are you doing?</h3>
+
+ <% if !@outgoing_message.errors[:what_doing_dummy].nil? %>
+ <div class="fieldWithErrors">
+ <% else %>
<div>
- <%= radio_button "outgoing_message", "what_doing", "normal_sort", :id => "sort_normal" %>
- <label for="sort_normal"><strong>Anything else</strong>, such as clarifying, prompting, thanking</label>
+ <% end %>
+ <!--
+ <div>
+ <%= radio_button "outgoing_message", "what_doing", "new_information", :id => "new_information" %>
+ <label for="new_information">I am asking for <strong>new information</strong> </label>
+ </div>
+ -->
+ <div>
+ <%= radio_button "outgoing_message", "what_doing", "internal_review", :id => "internal_review" %>
+ <label for="internal_review">I am requesting an <strong>internal review</strong>
+ (<a href="/help/unhappy">what's that?</a>)
+ </label>
+ </div>
+ <div>
+ <%= radio_button "outgoing_message", "what_doing", "normal_sort", :id => "sort_normal" %>
+ <label for="sort_normal"><strong>Anything else</strong>, such as clarifying, prompting, thanking</label>
+ </div>
</div>
- </div>
+ <% end %>
<p>
<%= hidden_field_tag 'submitted_followup', 1 %>
<%= hidden_field_tag(:preview, 1 ) %>
- <%= submit_tag "Preview your follow up message" %>
+ <% if @internal_review %>
+ <%= hidden_field_tag(:internal_review, 1 ) %>
+ <% end %>
+ <%= submit_tag "Preview your message" %>
</p>
<% end %>
diff --git a/app/views/request/followup_preview.rhtml b/app/views/request/followup_preview.rhtml
index a924b46ae..9cb602244 100644
--- a/app/views/request/followup_preview.rhtml
+++ b/app/views/request/followup_preview.rhtml
@@ -4,10 +4,15 @@
<% form_for(:outgoing_message, @outgoing_message, :html => { :id => 'preview_form' }, :url => (@incoming_message.nil? ? show_response_no_followup_url(:id => @info_request.id) : show_response_url(:id => @info_request.id, :incoming_message_id => @incoming_message.id)) + "#followup" ) do |o| %>
- <h1>Now preview your follow up</h1>
+ <% if @internal_review %>
+ <h1>Now preview your message asking for an internal review</h1>
+ <% else %>
+ <h1>Now preview your follow up</h1>
+ <% end %>
+
<ul>
<li>Check you haven't included any <strong>personal information</strong>.</li>
- <li>Your follow up message will appear in <strong>search engines</strong></li>
+ <li>Your message will appear in <strong>search engines</strong></li>
</ul>
<% fields_for :outgoing_message do |o| %>
@@ -36,10 +41,13 @@
</p>
<p>
- <%= hidden_field_tag(:submitted_followup, 1) %>
- <%= hidden_field_tag(:preview, 0 ) %>
- <%= submit_tag "Re-edit this follow up", :name => 'reedit' %>
- <%= submit_tag "Send follow up message", :name => 'submit' %>
+ <%= hidden_field_tag(:submitted_followup, 1) %>
+ <%= hidden_field_tag(:preview, 0 ) %>
+ <% if @internal_review %>
+ <%= hidden_field_tag(:internal_review, 1 ) %>
+ <% end %>
+ <%= submit_tag "Re-edit this message", :name => 'reedit' %>
+ <%= submit_tag "Send message", :name => 'submit' %>
</p>
<% end %>