aboutsummaryrefslogtreecommitdiffstats
path: root/app/views/request/_followup.rhtml
blob: 489696ed3a86d0365f7c31fb3baf2c99cda31e40 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
<div id="followup">

    <% if @internal_review %>
        <h1>Request an internal review
        from <%=h OutgoingMailer.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 OutgoingMailer.name_for_followup(@info_request, nil) %>
        </h2>
    <% else %>
        <h2>Send a public reply to 
        <%=h OutgoingMailer.name_for_followup(@info_request, incoming_message) %>
        </h2>
    <% end %>

    <% if @info_request.allow_new_responses_from == 'nobody' %>
        <p>Follow ups and new responses to this request have been stopped to prevent spam. Please
        <a href="/help/contact">contact us</a> if you are <%= user_link(@info_request.user) %>
        and need to send a follow up.</p>
    <% else %>
        <% if @internal_review %>
            <p>
            If you are dissatisfied by the response you got from
            the public authority, you have the right to
            complain (<a href="http://foiwiki.com/foiwiki/index.php/Internal_reviews">details</a>). 
            </p>
        <% end %>

        <p>Please <strong>only</strong> write messages directly relating to your 
        request '<%= request_link(@info_request) %>'. If you would like to ask for information
        that was not in your original request, then
        <%= link_to "file a new request", new_request_to_body_url(:public_body_id => @info_request.public_body.id.to_s) %>.

        <% if @info_request.calculate_status == 'waiting_response_overdue' %>
            <p>
            <% if @info_request.working_days_20_overdue? %>             
                This request is <strong>long overdue a response</strong>.
            <% else %>
                This request is <strong>overdue a response</strong>.
            <% end %>
            You can say that, by law, the authority should have answered
            <strong>promptly</strong>. If they have not given you a legal
            reason why they need extra time
            (<%= link_to "more details", about_url + "#quickly_response" %>), then
            you can say they are breaking the law to have not replied by
            <strong><%= simple_date(@info_request.date_response_required_by) %></strong>.
            <% if @info_request.public_body.is_school? %>
                This is a school, so legally they get lots of extra slack if it is 
                holiday time.
            <% end %>
       </p>
        <% end %>

        <% form_for(:outgoing_message, @outgoing_message, :html => { :id => 'followup_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)) do |o| %>
            <p>
                <%= o.text_area :body, :rows => 15, :cols => 55 %>
                <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>

            <% if @internal_review %>
                <%= hidden_field_tag "outgoing_message[what_doing]", "internal_review" %>
            <% else %>
                <h3>What are you doing?</h3>

                <% if !@outgoing_message.errors[:what_doing_dummy].nil? %>
                <div class="fieldWithErrors">
                <% 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>
                    <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>
            <% end %>

            <% if @internal_review %>
                <p>Edit and add <strong>more details</strong> to the message above,
                explaining why you are dissatisfied with their response.
                </p>
            <% end %>

            <p>
                <%= hidden_field_tag 'submitted_followup', 1 %>
                <%= hidden_field_tag(:preview, 1 ) %>
                <% if @internal_review_pass_on %>
                    <%= hidden_field_tag(:internal_review, 1 ) %>
                <% end %>
                <%= submit_tag "Preview your message" %>
            </p>
        <% end %>

        <p>
            <% if not @is_owning_user %>
            (You will be asked to sign in as <%= user_link(@info_request.user) %>)
            <% end %>
        </p>
    <% end %>

</div>