From ac207f72096692c2bc432ceb1ffbed6e8e7d62a9 Mon Sep 17 00:00:00 2001 From: Louise Crow Date: Thu, 5 Mar 2015 17:14:46 +0000 Subject: [PATCH] Make sure fields with errors are highlighted in the default locale. --- .../_locale_fields.html.erb | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/app/views/admin_public_body_categories/_locale_fields.html.erb b/app/views/admin_public_body_categories/_locale_fields.html.erb index 0d9a2f2072..d438f64f01 100644 --- a/app/views/admin_public_body_categories/_locale_fields.html.erb +++ b/app/views/admin_public_body_categories/_locale_fields.html.erb @@ -3,13 +3,25 @@ <%= t.hidden_field :locale, :value => locale.to_s %>
+ <% if locale == I18n.default_locale && t.object.errors[:title] %> + + <% end %> <%= t.text_field :title, :id => form_tag_id(t.object_name, :title, locale), :class => "span4" %> + <% if locale == I18n.default_locale && t.object.errors[:title] %> + + <%end %>
+ <% if locale == I18n.default_locale && t.object.errors[:description] %> + + <% end %> <%= t.text_field :description, :id => form_tag_id(t.object_name, :description, locale), :class => "span4" %> + <% if locale == I18n.default_locale && t.object.errors[:description] %> + + <%end %>