<commit_before><% @title = "Make an " + h(@info_request.law_used_short) + " request to '" + h(@info_request.public_body.name) + "'" %>

<% if @existing_request %>
    <div class="errorExplanation" id="errorExplanation"><ul>
    <li>
    <%= user_or_you_capital_link(@existing_request.user) %> already
    created the same request on <%=simple_date(@existing_request.created_at)%>.
    You can either view the <a href="<%=request_url(@existing_request)%>">existing request</a>,
    or edit the details below to make a new but similar request.
    </li>
    </ul></div>
<% end %>

<%= foi_error_messages_for :info_request, :outgoing_message %>

<div id="request_advice">
    <h1>Read this before writing your <%=h(@info_request.law_used_full)%> request</h1>
    <ul>
    <li>
        <% form_tag("http://www.google.co.uk/search", {:id => "search_body_website_form", :method => "get"} ) do %>
            <p>
                First, 
                <% if !@info_request.public_body.publication_scheme.empty? %>
                    <strong>browse</strong> the authority's 
                    <%= link_to "publication scheme", @info_request.public_body.publication_scheme %> 
                    or <strong>search</strong> their web site ...
                <% else %>
                       <strong>search</strong> the authority's web site ...
                <% end %>
                <% if !@info_request.public_body.calculated_home_page.nil? %>
                    <br>
                    &nbsp; &nbsp; &nbsp; &nbsp; <%= text_field_tag 'q', params[:q], { :size => 20 } %>
                    <%= hidden_field_tag 'as_sitesearch', @info_request.public_body.calculated_home_page %>
                    <%= submit_tag "Search" %>
               <% end %>
               <br>
               ... to check that the info isn't already published.
            </p>
        <% end %>
    </li>

    <li> 
        <% if @info_request.public_body.info_requests.size > 0 %>
            Browse <%= link_to "other requests", public_body_url(@info_request.public_body)  %> 
            to '<%= h(@info_request.public_body.name) %>'
            for examples of how to word your request.
        <% else %>
            Browse <%= link_to "other requests", request_list_url %> for examples of how to word your request.
        <% end %>
    </li>
    <li>Write your request in <strong>simple, precise language</strong>.</li>
    <li>Ask for <strong>specific</strong> documents or information, this site is not suitable for general enquiries.</li>
    <li>Keep it <strong>focused</strong>, you'll be more likely to get what you want (<a href="/help/about/#focused">why?</a>).</li>
    <li>This site is <strong>public</strong>. Everything you type and any response will be published.</li>
    </ul>

    <% if @info_request.public_body.has_notes? %>
        <h1>Special note for this authority!</h1>
        <ul>
            <li><p><%= @info_request.public_body.notes_as_html %></p></li>
        </ul>
    <% end %>

    <% if @info_request.public_body.eir_only? %>
        <h1>Please ask for environmental information only</h1>
        
        <p>The Freedom of Information Act <strong>does not apply</strong> to <%=h(@info_request.public_body.name)%>.  
        However, you have the right to request environmental
        information under a different law (<a href="/help/about#eir">explanation</a>).  
        This covers a very wide spectrum of information about the state of
        the <strong>natural and built environment</strong>, such as:

        <ul>
        <li>Air, water, soil, land, flora and fauna (including how these effect
        human beings)</li>
        <li>Information on emissions and discharges (e.g. noise, energy,
        radiation, waste materials)</li>
        <li>Human health and safety</li>
        <li>Cultural sites and built structures (as they may be affected by the
        environmental factors listed above)</li>
        <li>Plans and administrative measures that affect these matters</li>
        </ul>

        <p>Please only request information that comes under those categories, <strong>do not waste your
        time</strong> or the time of the public authority by requesting unrelated information.</p>
    <% end %>
</div>
	
<% form_for(:info_request, @info_request, :html => { :id => 'write_form' }  ) do |f| %>

	<div id="request_form">
		<h1>
			<label class="form_label" for="info_request_public_body_id">To:</label>
			<span id="to_public_body"><%=h(@info_request.public_body.name)%></span>
		</h1>
	
		<p>
			<label class="form_label" for="info_request_title">Subject:</label> 
			<%= f.text_field :title, :size => 50 %>
		</p>
		<div class="form_item_note">
			(a one line summary of the information you are requesting, 
			e.g. 
            <% if @info_request.law_used == 'eir' %>
                'Pollution levels over time for the River Tyne'<commit_msg>Say summary again.<commit_after><% @title = "Make an " + h(@info_request.law_used_short) + " request to '" + h(@info_request.public_body.name) + "'" %>

<% if @existing_request %>
    <div class="errorExplanation" id="errorExplanation"><ul>
    <li>
    <%= user_or_you_capital_link(@existing_request.user) %> already
    created the same request on <%=simple_date(@existing_request.created_at)%>.
    You can either view the <a href="<%=request_url(@existing_request)%>">existing request</a>,
    or edit the details below to make a new but similar request.
    </li>
    </ul></div>
<% end %>

<%= foi_error_messages_for :info_request, :outgoing_message %>

<div id="request_advice">
    <h1>Read this before writing your <%=h(@info_request.law_used_full)%> request</h1>
    <ul>
    <li>
        <% form_tag("http://www.google.co.uk/search", {:id => "search_body_website_form", :method => "get"} ) do %>
            <p>
                First, 
                <% if !@info_request.public_body.publication_scheme.empty? %>
                    <strong>browse</strong> the authority's 
                    <%= link_to "publication scheme", @info_request.public_body.publication_scheme %> 
                    or <strong>search</strong> their web site ...
                <% else %>
                       <strong>search</strong> the authority's web site ...
                <% end %>
                <% if !@info_request.public_body.calculated_home_page.nil? %>
                    <br>
                    &nbsp; &nbsp; &nbsp; &nbsp; <%= text_field_tag 'q', params[:q], { :size => 20 } %>
                    <%= hidden_field_tag 'as_sitesearch', @info_request.public_body.calculated_home_page %>
                    <%= submit_tag "Search" %>
               <% end %>
               <br>
               ... to check that the info isn't already published.
            </p>
        <% end %>
    </li>

    <li> 
        <% if @info_request.public_body.info_requests.size > 0 %>
            Browse <%= link_to "other requests", public_body_url(@info_request.public_body)  %> 
            to '<%= h(@info_request.public_body.name) %>'
            for examples of how to word your request.
        <% else %>
            Browse <%= link_to "other requests", request_list_url %> for examples of how to word your request.
        <% end %>
    </li>
    <li>Write your request in <strong>simple, precise language</strong>.</li>
    <li>Ask for <strong>specific</strong> documents or information, this site is not suitable for general enquiries.</li>
    <li>Keep it <strong>focused</strong>, you'll be more likely to get what you want (<a href="/help/about/#focused">why?</a>).</li>
    <li>This site is <strong>public</strong>. Everything you type and any response will be published.</li>
    </ul>

    <% if @info_request.public_body.has_notes? %>
        <h1>Special note for this authority!</h1>
        <ul>
            <li><p><%= @info_request.public_body.notes_as_html %></p></li>
        </ul>
    <% end %>

    <% if @info_request.public_body.eir_only? %>
        <h1>Please ask for environmental information only</h1>
        
        <p>The Freedom of Information Act <strong>does not apply</strong> to <%=h(@info_request.public_body.name)%>.  
        However, you have the right to request environmental
        information under a different law (<a href="/help/about#eir">explanation</a>).  
        This covers a very wide spectrum of information about the state of
        the <strong>natural and built environment</strong>, such as:

        <ul>
        <li>Air, water, soil, land, flora and fauna (including how these effect
        human beings)</li>
        <li>Information on emissions and discharges (e.g. noise, energy,
        radiation, waste materials)</li>
        <li>Human health and safety</li>
        <li>Cultural sites and built structures (as they may be affected by the
        environmental factors listed above)</li>
        <li>Plans and administrative measures that affect these matters</li>
        </ul>

        <p>Please only request information that comes under those categories, <strong>do not waste your
        time</strong> or the time of the public authority by requesting unrelated information.</p>
    <% end %>
</div>
	
<% form_for(:info_request, @info_request, :html => { :id => 'write_form' }  ) do |f| %>

	<div id="request_form">
		<h1>
			<label class="form_label" for="info_request_public_body_id">To:</label>
			<span id="to_public_body"><%=h(@info_request.public_body.name)%></span>
		</h1>
	
		<p>
			<label class="form_label" for="info_request_title">Summary:</label> 
			<%= f.text_field :title, :size => 50 %>
		</p>
		<div class="form_item_note">
			(a one line summary of the information you are requesting, 
			e.g. 
            <% if @info_request.law_used == 'eir' %>
                'Pollution levels over time for the River Tyne'
{'fraction_non_alphanumeric': 0.13897682017767793, 'fraction_numerical': 0.0026549576227917903, 'mean_word_length': 2.600735294117647, 'pattern_counts': {'":': 0, '<': 255, '<?xml version=': 0, '>': 269, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3799424', 'n_tokens_mistral': 3148, 'n_tokens_neox': 2862, 'n_words': 795}