<div class="box tabular">
  <p>
    <%= f.label :type, l(:field_type) %>

    <% if f.object.new_record? %>
      <%= f.select :type, EasyEarnedValue.subclasses.map{|s| [s.type_name, s] } %>
    <% else %>
      <%= f.object.type_name %>
    <% end %>
  </p>

  <p>
    <%= f.label :baseline_id, l(:label_easy_baselines) %>

    <% if f.object.new_record? || f.object.baseline.nil? %>
      <%= f.collection_select :baseline_id, @baselines, :id, :name, prompt: true %>
    <% else %>
      <%= f.object.baseline.try(:name) %>
    <% end %>
  </p>

  <p>
    <%= f.label :name, l(:field_name) %>
    <%= f.text_field :name %>
  </p>

  <p>
    <%= f.label :project_default, l(:label_default) %>
    <%= f.check_box :project_default %>
  </p>
</div>
