diff --git a/app/components/admin/site_customization/information_texts/form_component.html.erb b/app/components/admin/site_customization/information_texts/form_component.html.erb
index d9b1bb245..044bd1019 100644
--- a/app/components/admin/site_customization/information_texts/form_component.html.erb
+++ b/app/components/admin/site_customization/information_texts/form_component.html.erb
@@ -6,7 +6,6 @@
<% end %>
<% contents.each do |group| %>
<% group.each do |content| %>
- <%= content.key %>
<%= hidden_field_tag "contents[content_#{content.key}][id]", content.key %>
<% (content.globalize_locales & enabled_locales.map(&:to_sym)).each do |locale| %>
<%= render Admin::SiteCustomization::InformationTexts::FormFieldComponent.new(content, locale: locale) %>
diff --git a/app/components/admin/site_customization/information_texts/form_field_component.html.erb b/app/components/admin/site_customization/information_texts/form_field_component.html.erb
index ddc552f6d..1e546cf19 100644
--- a/app/components/admin/site_customization/information_texts/form_field_component.html.erb
+++ b/app/components/admin/site_customization/information_texts/form_field_component.html.erb
@@ -1,8 +1,6 @@
<% globalize(locale) do %>
- <%= text_area_tag "contents[content_#{i18n_key}]values[value_#{locale}]",
- text,
- rows: 5,
- class: "js-globalize-attribute",
- style: site_customization_display_translation_style,
- data: { locale: locale } %>
+
+ <%= label_tag html_id, i18n_key %>
+ <%= text_area_tag html_name, text, id: html_id, rows: 5 %>
+
<% end %>
diff --git a/app/components/admin/site_customization/information_texts/form_field_component.rb b/app/components/admin/site_customization/information_texts/form_field_component.rb
index d000471e2..046630722 100644
--- a/app/components/admin/site_customization/information_texts/form_field_component.rb
+++ b/app/components/admin/site_customization/information_texts/form_field_component.rb
@@ -27,7 +27,15 @@ class Admin::SiteCustomization::InformationTexts::FormFieldComponent < Applicati
i18n_content.key
end
- def site_customization_display_translation_style
+ def html_id
+ html_name.tr("[", "_").tr("]", "")
+ end
+
+ def html_name
+ "contents[content_#{i18n_key}]values[value_#{locale}]"
+ end
+
+ def display_style
site_customization_enable_translation?(locale) ? "" : "display: none;"
end
end
diff --git a/spec/system/admin/translatable_spec.rb b/spec/system/admin/translatable_spec.rb
index c9deea0e1..f9bc3dcc9 100644
--- a/spec/system/admin/translatable_spec.rb
+++ b/spec/system/admin/translatable_spec.rb
@@ -496,11 +496,11 @@ describe "Admin edit translatable records", :admin do
scenario "Show selected locale form" do
visit path
- expect(page).to have_field "contents_content_#{content.key}values_value_en", with: "Value in English"
+ expect(page).to have_field content.key, with: "Value in English"
select "Español", from: "Current language"
- expect(page).to have_field "contents_content_#{content.key}values_value_es", with: "Value en español"
+ expect(page).to have_field content.key, with: "Value en español"
end
scenario "Select a locale and add it to the form" do