<%= error_messages_for 'custom_field' %>

<%= f.text_field :name, :required => true %>

<%= f.select :field_format, custom_field_formats_for_select, {}, :onchange => "toggle_custom_field_format();" %>

<%= f.text_field :min_length, :size => 5, :no_label => true %> - <%= f.text_field :max_length, :size => 5, :no_label => true %>
(<%=l(:text_min_max_length_info)%>)

<%= f.text_field :regexp, :size => 50 %>
(<%=l(:text_regexp_info)%>)

<% (@custom_field.possible_values.to_a + [""]).each do |value| %> <%= text_field_tag 'custom_field[possible_values][]', value, :size => 30 %> <%= image_to_function "delete.png", "deleteValueField(this);return false" %>
<% end %>

<%= javascript_tag "toggle_custom_field_format();" %>
<% case @custom_field.type.to_s when "IssueCustomField" %>
<%=l(:label_tracker_plural)%> <% for tracker in @trackers %> <%= check_box_tag "tracker_ids[]", tracker.id, (@custom_field.trackers.include? tracker) %> <%= tracker.name %> <% end %>
 

<%= f.check_box :is_required %>

<%= f.check_box :is_for_all %>

<%= f.check_box :is_filter %>

<% when "UserCustomField" %>

<%= f.check_box :is_required %>

<% when "ProjectCustomField" %>

<%= f.check_box :is_required %>

<% end %>