%= 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();", :disabled => !@custom_field.new_record? %>
<%= 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)%>)
<%= f.text_area :possible_values, :value => @custom_field.possible_values.to_a.join("\n"),
:cols => 20,
:rows => 15 %>
<%= l(:text_custom_field_possible_values_info) %>
<%= @custom_field.field_format == 'bool' ? f.check_box(:default_value) : f.text_field(:default_value) %>
<%= f.check_box :is_required %>
<%= f.check_box :is_for_all %>
<%= f.check_box :is_filter %>
<%= f.check_box :searchable %>
<% when "UserCustomField" %><%= f.check_box :is_required %>
<%= f.check_box :editable %>
<% when "ProjectCustomField" %><%= f.check_box :is_required %>
<% when "TimeEntryCustomField" %><%= f.check_box :is_required %>
<% end %>