26 lines
1011 B
Plaintext
26 lines
1011 B
Plaintext
<%= fields_for 'user[user_roles][attributes]', attribute, :index => nil do |f| %>
|
|
<%#= f.hidden_field :id unless attribute.new_record? %>
|
|
<% if attr["locale"] %>
|
|
<p>
|
|
<%#= 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_roles][attributes][i18n_user][#{locale}]", (attribute.i18n_user[locale] rescue nil) %>
|
|
<% end -%>
|
|
<% elsif attr["markup"] == "select" %>
|
|
<%= f.select "#{attr["key"]}_#{I18n.locale}", attr["options_#{I18n.locale}"].to_a %>
|
|
<% end -%>
|
|
</p>
|
|
<% else %>
|
|
<p>
|
|
<%= 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 -%>
|
|
</p>
|
|
<% end -%>
|
|
<% end %>
|