Orbit/app/views/admin/user_attributes/_form.html.erb

32 lines
961 B
Plaintext
Raw Normal View History

2010-03-15 09:35:01 +00:00
<p>
2011-12-05 02:36:25 +00:00
<%= f.label :name %>
<%= f.text_field :name %>
2010-03-15 09:35:01 +00:00
</p>
<fieldset>
2011-12-05 02:36:25 +00:00
<% @user_attribute.attrs.each_with_index do |attr, i| %>
<p>
<label><%= attr["key"] %></label>
<%= hidden_field_tag "user_attribute[attrs][][key]", attr["key"] %>
<%= text_field_tag "user_attribute[attrs][][name]", attr["name"] %>
<%= select_tag "user_attribute[attrs][][type]", options_for_select(["text_field", "select"], attr["type"]) %>
<a href="#" class="remove">(remove)</a>
</p>
<% end -%>
<p id="newone">
<label>Key</label>
<%= text_field_tag "user_attribute[attrs][][key]", "" %>
<label>Name</label>
<%= text_field_tag "user_attribute[attrs][][name]", "" %>
<%= select_tag "user_attribute[attrs][][type]", options_for_select(["text_field"], "") %>
<a href="#" class="remove">(remove)</a>
</p>
<a href="#" class="add">(add)</a>
2010-03-15 09:35:01 +00:00
</fieldset>
<% content_for :page_specific_javascript do %>
2011-12-05 02:36:25 +00:00
<%= javascript_include_tag "user_attribute_form" %>
2010-03-15 09:35:01 +00:00
<% end -%>