Fix duplicate fields in information texts form
We were rendering the same hidden field, with the same HTML ID, one time per enabled locale.
This commit is contained in:
@@ -7,6 +7,7 @@
|
|||||||
<% contents.each do |group| %>
|
<% contents.each do |group| %>
|
||||||
<% group.each do |content| %>
|
<% group.each do |content| %>
|
||||||
<b><%= content.key %></b>
|
<b><%= content.key %></b>
|
||||||
|
<%= hidden_field_tag "contents[content_#{content.key}][id]", content.key %>
|
||||||
<% (content.globalize_locales & enabled_locales.map(&:to_sym)).each do |locale| %>
|
<% (content.globalize_locales & enabled_locales.map(&:to_sym)).each do |locale| %>
|
||||||
<%= render Admin::SiteCustomization::InformationTexts::FormFieldComponent.new(content, locale: locale) %>
|
<%= render Admin::SiteCustomization::InformationTexts::FormFieldComponent.new(content, locale: locale) %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
<% globalize(locale) do %>
|
<% globalize(locale) do %>
|
||||||
<%= hidden_field_tag "contents[content_#{i18n_content.key}][id]", i18n_content.key %>
|
|
||||||
<%= text_area_tag "contents[content_#{i18n_content.key}]values[value_#{locale}]",
|
<%= text_area_tag "contents[content_#{i18n_content.key}]values[value_#{locale}]",
|
||||||
text,
|
text,
|
||||||
rows: 5,
|
rows: 5,
|
||||||
|
|||||||
Reference in New Issue
Block a user