aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGareth Rees <gareth@mysociety.org>2014-10-29 16:57:11 +0000
committerGareth Rees <gareth@mysociety.org>2014-10-30 15:45:47 +0000
commit58e29381a2010eb20e7a530ca0cdff59aed24d6d (patch)
tree330573480148c67f936c0424d10d94a6cfc12baa
parent8a21f27ed7d0377f373a6ff1afe7195a4e1fe069 (diff)
Tidy up request/select_authority.html.erb
- Align indentation - Use named path for form url - Use %Q() to avoid string escaping - Use :anchor option to link to help page section - Use symbols for form tag names
-rw-r--r--app/views/request/select_authority.html.erb49
1 files changed, 26 insertions, 23 deletions
diff --git a/app/views/request/select_authority.html.erb b/app/views/request/select_authority.html.erb
index 462a8c8ce..6c17a0d15 100644
--- a/app/views/request/select_authority.html.erb
+++ b/app/views/request/select_authority.html.erb
@@ -12,30 +12,33 @@
<% @title = _("Select the authority to write to") %>
- <h1 style="clear: left"><%= _('Select an authority') %></h1>
+<h1 style="clear: left"><%= _('Select an authority') %></h1>
- <div id="authority_selection">
- <%= form_tag({:controller => "request", :action => "select_authority"}, {:id => "search_form", :method => "get"}) do %>
- <div>
- <p>
- <%= _('First, type in the <strong>name of the UK public authority</strong> you\'d
- like information from. <strong>By law, they have to respond</strong>
- (<a href="{{url}}">why?</a>).', :url => (help_about_path + "#whybother_them").html_safe) %>
- </p>
- <%= text_field_tag 'query', params[:query], { :size => 30, :title => "type your search term here" } %>
- <%= hidden_field_tag 'bodies', 1 %>
- <%= submit_tag _('Search') %>
- </div>
- <% if AlaveteliConfiguration.allow_batch_requests && @user && @user.can_make_batch_requests? %>
- <div id="batch_request_link">
- <p>
- <%= _('Or make a <a href="{{url}}">batch request</a> to <strong>multiple authorities</strong> at once.', :url => select_authorities_path) %>
- </p>
- </div>
- <% end %>
- <% end %>
+<div id="authority_selection">
+ <%= form_tag select_authority_path, { :id => 'search_form', :method => 'get' } do %>
+ <div>
+ <p>
+ <%= _(%Q(First, type in the <strong>name of the UK public authority</strong> you'd
+ like information from. <strong>By law, they have to respond</strong>
+ (<a href="{{url}}">why?</a>).), :url => (help_about_path(:anchor => 'whybother_them')).html_safe) %>
+ </p>
- <div id="typeahead_response">
- <%= render :partial => 'public_body/search_ahead' %>
+ <%= text_field_tag :query, params[:query], { :size => 30, :title => "type your search term here" } %>
+ <%= hidden_field_tag :bodies, 1 %>
+ <%= submit_tag _('Search') %>
</div>
+
+ <% if AlaveteliConfiguration.allow_batch_requests && @user && @user.can_make_batch_requests? %>
+ <div id="batch_request_link">
+ <p>
+ <%= _('Or make a <a href="{{url}}">batch request</a> to <strong>multiple authorities</strong> at once.',
+ :url => select_authorities_path) %>
+ </p>
+ </div>
+ <% end %>
+ <% end %>
+
+ <div id="typeahead_response">
+ <%= render :partial => 'public_body/search_ahead' %>
</div>
+</div>