<%= fields_for "user[user_#{type}s]", user_attribute, :index => nil do |f| %> <%= ua.i18n_variable[I18n.locale] %> <%= f.hidden_field :key, :value => ua.key %> <%= f.hidden_field :id unless user_attribute.new_record? %> <% @site_valid_locales.each do |locale| %> <% end %> <% ua.attribute_models.each do |attr| %> <% if attr["locale"] && attr["markup"] == 'text_field' %> <% @site_valid_locales.each do |locale| %> <% end -%> <% else %> <% end -%> <% end %>
<%= t("admin.key") %><%= locale %>
<%= attr.i18n_variable[I18n.locale] %> <%= text_field_tag "user[user_#{type}s][][#{attr.key}_#{locale}]", (user_attribute["#{attr.key}_#{locale}"] rescue nil) %> > <% if attr["markup"] == "text_field" %> <%= text_field_tag "user[user_#{type}s][][#{attr.key}]", (user_attribute[attr.key] rescue nil) %> <% elsif attr["markup"] == "select" %> <%= select_tag "user[user_#{type}s][][#{attr.key}]", options_for_select(attr["options"], user_attribute[attr.key]) %> <% end -%>
<% end %>