aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--app/models/public_body.rb2
-rw-r--r--app/views/public_body/_list_sidebar_extra.rhtml6
-rw-r--r--app/views/public_body/list.rhtml9
-rw-r--r--app/views/request/new.rhtml2
-rw-r--r--app/views/user/_signin.rhtml10
-rw-r--r--app/views/user/_signup.rhtml10
-rw-r--r--lib/configuration.rb1
7 files changed, 21 insertions, 19 deletions
diff --git a/app/models/public_body.rb b/app/models/public_body.rb
index d212c371f..34bcd332c 100644
--- a/app/models/public_body.rb
+++ b/app/models/public_body.rb
@@ -511,7 +511,7 @@ class PublicBody < ActiveRecord::Base
# Returns nil if configuration variable not set
def override_request_email
- e = MySociety::Config.get("OVERRIDE_ALL_PUBLIC_BODY_REQUEST_EMAILS", "")
+ e = Configuration::override_all_public_body_request_emails
e if e != ""
end
diff --git a/app/views/public_body/_list_sidebar_extra.rhtml b/app/views/public_body/_list_sidebar_extra.rhtml
new file mode 100644
index 000000000..6857a7eb5
--- /dev/null
+++ b/app/views/public_body/_list_sidebar_extra.rhtml
@@ -0,0 +1,6 @@
+<p>
+ <%= _('<a href="%s">Are we missing a public authority?</a>') % [help_requesting_path + '#missing_body'] %>
+</p>
+<p>
+ <%= link_to _('List of all authorities (CSV)'), all_public_bodies_csv_url() %>
+</p>
diff --git a/app/views/public_body/list.rhtml b/app/views/public_body/list.rhtml
index a66a7f8fd..3a64de1f7 100644
--- a/app/views/public_body/list.rhtml
+++ b/app/views/public_body/list.rhtml
@@ -25,12 +25,7 @@
<% if not first_row %>
</ul>
<% end %>
- <p>
- <%= _('<a href="%s">Are we missing a public authority?</a>') % [help_requesting_path + '#missing_body'] %>
- </p>
- <p>
- <%= link_to _('List of all authorities (CSV)'), all_public_bodies_csv_url() %>
- </p>
+ <%= render :partial => "list_sidebar_extra" %>
</div>
<% @title = @description.empty? ? _("Public authorities") : _("Public authorities - {{description}}", :description => @description) %>
@@ -44,7 +39,7 @@
</div>
<% end %>
-<h2 class="publicbody_results"><%= _('Found {{count}} public authorities {{description}}', :count=>@public_bodies.total_entries, :description=>@description) %></h2>
+<h2 class="publicbody_results"><%= n_('Found %d public authority %s', 'Found %d public authorities %s', @public_bodies.total_entries) % [@public_bodies.total_entries, @description] %></h2>
<%= render :partial => 'body_listing', :locals => { :public_bodies => @public_bodies } %>
<%= will_paginate(@public_bodies) %><br/>
diff --git a/app/views/request/new.rhtml b/app/views/request/new.rhtml
index 2ef193c42..fe4c2067d 100644
--- a/app/views/request/new.rhtml
+++ b/app/views/request/new.rhtml
@@ -116,7 +116,7 @@
will be <strong>displayed publicly</strong> on
this website forever (<a href="%s">why?</a>).') % [help_privacy_path+"#public_request"] %>
<%= _('If you are thinking of using a pseudonym,
- please <a href="%s">read this first</a>.') % [help_privacy_path+"#public_request"] %>
+ please <a href="%s">read this first</a>.') % [help_privacy_path+"#real_name"] %>
</p>
<% else %>
<p class="form_note">
diff --git a/app/views/user/_signin.rhtml b/app/views/user/_signin.rhtml
index 4fe98ee41..c4d917991 100644
--- a/app/views/user/_signin.rhtml
+++ b/app/views/user/_signin.rhtml
@@ -9,27 +9,27 @@
<p>
<label class="form_label" for="user_signin_email"><%= _('Your e-mail:')%></label>
- <%= text_field 'user_signin', 'email', { :size => 20 } %>
+ <%= text_field 'user_signin', 'email', { :size => 20, :tabindex => 10 } %>
</p>
<p>
<label class="form_label" for="user_signin_password"><%= _('Password:')%></label>
- <%= password_field 'user_signin', 'password', { :size => 15 } %>
+ <%= password_field 'user_signin', 'password', { :size => 15, :tabindex => 20 } %>
</p>
<p class="form_note">
- <%= link_to _('Forgotten your password?'), signchangepassword_url + "?pretoken=" + h(params[:token]) %>
+ <%= link_to _('Forgotten your password?'), signchangepassword_url + "?pretoken=" + h(params[:token]), :tabindex => 30 %>
</p>
<p class="form_checkbox">
- <%= check_box_tag 'remember_me', "1" %>
+ <%= check_box_tag 'remember_me', "1", false, :tabindex => 40 %>
<label for="remember_me"><%= _('Remember me</label> (keeps you signed in longer;
do not use on a public computer) ')%></p>
<div class="form_button">
<%= hidden_field_tag 'token', params[:token], {:id => 'signin_token' } %>
<%= hidden_field_tag :modal, params[:modal], {:id => 'signin_modal' } %>
- <%= submit_tag _('Sign in') %>
+ <%= submit_tag _('Sign in'), :tabindex => 50 %>
</div>
<% end %>
diff --git a/app/views/user/_signup.rhtml b/app/views/user/_signup.rhtml
index 9c0132f26..bb93b9617 100644
--- a/app/views/user/_signup.rhtml
+++ b/app/views/user/_signup.rhtml
@@ -7,7 +7,7 @@
<p>
<label class="form_label" for="user_signup_email"><%= _('Your e-mail:')%></label>
- <%= text_field 'user_signup', 'email', { :size => 20 } %>
+ <%= text_field 'user_signup', 'email', { :size => 20, :tabindex => 60 } %>
</p>
<div class="form_item_note">
<%= _('We will not reveal your email address to anybody unless you or
@@ -16,7 +16,7 @@
<p>
<label class="form_label" for="user_signup_name"> <%= _('Your name:')%></label>
- <%= text_field 'user_signup', 'name', { :size => 20 } %>
+ <%= text_field 'user_signup', 'name', { :size => 20, :tabindex => 70 } %>
</p>
<div class="form_item_note">
<%= _('Your <strong>name will appear publicly</strong>
@@ -28,12 +28,12 @@
<p>
<label class="form_label" for="user_signup_password"> <%= _('Password:')%></label>
- <%= password_field 'user_signup', 'password', { :size => 15 } %>
+ <%= password_field 'user_signup', 'password', { :size => 15, :tabindex => 80 } %>
</p>
<p>
<label class="form_label" for="user_signup_password_confirmation"> <%= _('Password: (again)')%></label>
- <%= password_field 'user_signup', 'password_confirmation', { :size => 15 } %>
+ <%= password_field 'user_signup', 'password_confirmation', { :size => 15, :tabindex => 90 } %>
</p>
<% if @request_from_foreign_country %>
@@ -43,7 +43,7 @@
<div class="form_button">
<%= hidden_field_tag 'token', params[:token], {:id => 'signup_token' } %>
<%= hidden_field_tag :modal, params[:modal], {:id => 'signup_modal' } %>
- <%= submit_tag _('Sign up') %>
+ <%= submit_tag _('Sign up'), :tabindex => 100 %>
</div>
<% end %>
diff --git a/lib/configuration.rb b/lib/configuration.rb
index 79dbccf71..5f761a1f6 100644
--- a/lib/configuration.rb
+++ b/lib/configuration.rb
@@ -31,6 +31,7 @@ module Configuration
:ISO_COUNTRY_CODE => 'GB',
:MAX_REQUESTS_PER_USER_PER_DAY => nil,
:NEW_RESPONSE_REMINDER_AFTER_DAYS => [3, 10, 24],
+ :OVERRIDE_ALL_PUBLIC_BODY_REQUEST_EMAILS => '',
:RAW_EMAILS_LOCATION => 'files/raw_emails',
:READ_ONLY => '',
:RECAPTCHA_PRIVATE_KEY => 'x',