aboutsummaryrefslogtreecommitdiffstats
path: root/lib/views/help/contact.html.erb
blob: d228aa3a516d826467f9a069ab2d05349047f6c2 (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
<% @title = "Contact us" %>

<%= foi_error_messages_for :contact %>

<h1><%= @title %></h1>

<div id="contact_preamble">

    <% if !flash[:notice] %>
        <h2>Contact an authority to get official information</h2>
        <ul>
            <li><a href="<%= new_request_path %>">Go here</a> to make a request, in public, for information
            from public authorities.</li>

            <li>
            Asking for private information about yourself?
            Please read our
            <a href="<%= help_requesting_path(:anchor => 'data_protection') %>">help page</a>.
            </li>
        </ul>

    <% end %>

    <h2>Contact the <%= site_name %> team</h2>
    <% if !flash[:notice] %>
            <ul>
            <li>
            Please read the  <a href="<%= help_about_path %>">help page</a> first, as it may
            answer your question quicker.
            </li>

            <li>We'd love to hear how you've found using this site.
               Either fill in this form, or send an email to <a
               href="mailto:<%=@contact_email%>"><%=@contact_email%></a>
            </li>

            <li>We are a <strong>charity</strong> and not part of the
            Government.</li>
            </ul>
    <% end %>
</div>

<%= form_for :contact do |f| %>

    <% if not @user %>
        <p>
            <label class="form_label" for="contact_name">Your name:</label>
            <%= f.text_field :name, :size => 20 %>
            (or <%= link_to "sign in", signin_path(:r => request.fullpath) %>)
        </p>

        <p>
            <label class="form_label" for="contact_email">Your email:</label>
            <%= f.text_field :email, :size => 20 %>
        </p>
    <% end %>

    <p>
        <label class="form_label" for="contact_subject">Subject:</label>
        <%= f.text_field :subject, :size => 50 %>
    </p>

    <p>
        <label class="form_label" for="contact_message">Message to website:</label>
        <%= f.text_area :message, :rows => 10, :cols => 60 %>
    </p>

    <p style="display:none;">
        <%= f.label :comment, 'Do not fill in this field' %>
        <%= f.text_field :comment %>
    </p>

    <% if !@last_request.nil? %>
        <p>
            <label class="form_label" for="contact_message">Include link to request:</label>
            <%=request_link(@last_request) %>
            <%= submit_tag "remove", :name => 'remove' %>
        </p>
    <% end %>
    <% if !@last_body.nil? %>
        <p>
            <label class="form_label" for="contact_message">Include link to authority:</label>
            <%=public_body_link(@last_body) %>
            <%= submit_tag "remove", :name => 'remove' %>
        </p>
    <% end %>

    <p class="form_note">
    We can only help you with <strong>technical problems</strong>, or questions
    about Freedom of Information.
    </P>


    <div class="form_button">
        <%= hidden_field_tag(:submitted_contact_form, 1) %>
        <%= submit_tag "Send message to the charity", :disable_with => "Sending..." %>
        &lt;-- we run this site, not the Government!
    </div>

<% end %>