cirandas.net

ref: master

app/views/features/_manage_custom_fields.html.erb


<%= _("Custom Fields") %>


<% form_id = "#{customized_type.to_s.downcase}-custom-fields-form" %> <% fields_id = "#{customized_type.to_s.downcase}-custom-fields" %> <% format_values_id = "#{customized_type.to_s.downcase}-formats" %> <%= form_tag({:action => 'manage_custom_fields'}, :id => "#{form_id}") do %> <%= hidden_field_tag 'customized_type', customized_type.to_s %>
<% customized_type.custom_fields(environment).each do |field|%> <%= form_for_field(field, customized_type.to_s) %> <% end %>
<%= _('New field') %> <%= select_tag _('Type: '), options_for_select(custom_field_forms(customized_type.to_s)), {:id => "#{format_values_id}"} %> <%= button(:add, _('Add'), 'javascript: void()', :onClick => "add_content('##{fields_id}',$('##{format_values_id} option:selected').val(), 'NEW_FIELD_ID');") %>
<%= button_bar do %> <%= button(:save, _('Save'), 'javascript: void()', :onClick => "submit_custom_field_form('##{format_values_id}', '##{form_id}');") %> <% end %> <% end %>