%= render :partial=>"form_header" %>
<%#TODO club autocomplete %>
<%= form_for [refinery, :race_registrations, @person] do |f| -%>
<%= render '/refinery/admin/error_messages',
:object => @person,
:include_object_name => true %>
<%= f.label :registration_id %>
<%= f.collection_select(:registration_id, @registrations, :id, :title,
(@registrations.length == 1) ? {} : {:prompt=> :true},
{ :data => {:placeholder=> t('.choose_registration')}, :multiple=> false, :class=> "chzn-select"}) %>
<%= f.label :category_id %>
<%= f.collection_select(:category_id, @categories, :id, :title,
(@categories.length == 1) ? {} : { :prompt => :true },
{ :data => {:placeholder=> t('.choose_category')}, :multiple=> false, :class=> "chzn-select"}) %>
<%= f.label :name -%>
<%= f.text_field :name -%>
<%= f.label :surname -%>
<%= f.text_field :surname -%>
<%= f.label :email -%>
<%= f.text_field :email -%>
<%= f.label :birth_date -%>
<%= f.date_select :birth_date , :start_year => 1910, :include_blank=> true -%>
<%= f.label :club, t('.club_if_you_have'), :id=>"label_person_club" -%>
<%= f.text_field :club -%>
<%= f.label :city -%>
<%= f.text_field :city -%>
<%= f.label :humanizer_answer, @person.humanizer_question %>
<%= f.text_field :humanizer_answer %>
<%= f.hidden_field :humanizer_question_id %>
<%= f.submit t('.save_registration') %>
<% end -%>