<p>
  <label for="import_mapping_project_id"><%= l(:label_project) %></label>
  <%= select_tag 'import_settings[mapping][project_id]',
        options_for_select(project_tree_options_for_select(@import.allowed_target_projects, :selected => @import.project)),
        :id => 'import_mapping_project_id' %>
</p>
<p>
  <label for="import_mapping_tracker"><%= l(:field_tracker) %></label>
  <%= mapping_select_tag @import, 'tracker', :required => true,
        :values => @import.allowed_target_trackers.sorted.map {|t| [t.name, t.id]} %>
</p>
<p>
  <label for="import_mapping_status"><%= l(:field_status) %></label>
  <%= mapping_select_tag @import, 'status' %>
</p>

<div class="splitcontent">
<div class="splitcontentleft">
<p>
  <label for="import_mapping_subject"><%= l(:field_subject) %></label>
  <%= mapping_select_tag @import, 'subject', :required => true %>
</p>
<p>
  <label for="import_mapping_description"><%= l(:field_description) %></label>
  <%= mapping_select_tag @import, 'description' %>
</p>
<p>
  <label for="import_mapping_priority"><%= l(:field_priority) %></label>
  <%= mapping_select_tag @import, 'priority' %>
</p>
<p>
  <label for="import_mapping_category"><%= l(:field_category) %></label>
  <%= mapping_select_tag @import, 'category' %>
  <% if User.current.allowed_to?(:manage_categories, @import.project) %>
    <label class="block">
      <%= check_box_tag 'import_settings[mapping][create_categories]', '1', @import.create_categories? %>
      <%= l(:label_create_missing_values) %>
    </label>
  <% end %>
</p>
<p>
  <label for="import_mapping_assigned_to"><%= l(:field_assigned_to) %></label>
  <%= mapping_select_tag @import, 'assigned_to' %>
</p>
<p>
  <label for="import_mapping_fixed_version"><%= l(:field_fixed_version) %></label>
  <%= mapping_select_tag @import, 'fixed_version' %>
  <% if User.current.allowed_to?(:manage_versions, @import.project) %>
    <label class="block">
      <%= check_box_tag 'import_settings[mapping][create_versions]', '1', @import.create_versions? %>
      <%= l(:label_create_missing_values) %>
    </label>
  <% end %>
</p>
</div>

<div class="splitcontentright">
<p>
  <label for="import_mapping_is_private"><%= l(:field_is_private) %></label>
  <%= mapping_select_tag @import, 'is_private' %>
</p>
<p>
  <label for="import_mapping_start_date"><%= l(:field_start_date) %></label>
  <%= mapping_select_tag @import, 'start_date' %>
</p>
<p>
  <label for="import_mapping_due_date"><%= l(:field_due_date) %></label>
  <%= mapping_select_tag @import, 'due_date' %>
</p>
<p>
  <label for="import_mapping_estimated_hours"><%= l(:field_estimated_hours) %></label>
  <%= mapping_select_tag @import, 'estimated_hours' %>
</p>
<p>
  <label for="import_mapping_done_ratio"><%= l(:field_done_ratio) %></label>
  <%= mapping_select_tag @import, 'done_ratio' %>
</p>
<% @custom_fields.each do |field| %>
  <p>
    <label for="import_mapping_cf_<%= field.id %>"><%= field.name %></label>
    <%= mapping_select_tag @import, "cf_#{field.id}" %>
  </p>
<% end %>
</div>
</div>
