%= fields_for 'user[user_attributes][attribute_attrs]', attribute_attr, :index => nil do |f| %> <%#= f.hidden_field :id unless attribute_attr.new_record? %> <% if attr["locale"] %>
<%#= f.hidden_field :key, :value => attr["key"] %> <% if attr["markup"] == "text_field" %> <% @site_valid_locales.each do |locale| %> <%= f.label attr.i18n_variable[locale] %> <%= text_field_tag "user[user_attributes][attribute_attrs][i18n_user][#{locale}]", (attribute_attr.i18n_user[locale] rescue nil) %> <% end -%> <% elsif attr["markup"] == "select" %> <%= f.select "#{attr["key"]}_#{I18n.locale}", attr["options_#{I18n.locale}"].to_a %> <% end -%>
<% else %><%= f.label attr["name"] %> <% if attr["markup"] == "text_field" %> <%= f.text_field "#{attr["key"]}" %> <% elsif attr["markup"] == "select" %> <%= f.select "#{attr["key"]}", attr["options"].to_a %> <% end -%>
<% end -%> <% end %>