app/views/collection_objects/_form.html.erb
<%= form_for(@collection_object.metamorphosize) do |f| %>
<%= render 'shared/errors', object: @collection_object %>
<div class="flexbox">
<div class="item item1">
<div class="required">
<div class="or">
<div class="option float_left">
<div class="field">
<%= f.label :total %>
<br>
<%= f.number_field :total %>
</div>
</div>
<div class="option float_left">
<div class="field">
<%= f.label :ranged_lot_category %>
<br>
<%= f.select(:ranged_lot_category_id, options_from_collection_for_select(RangedLotCategory.with_project_id(sessions_current_project_id).to_a, :id, :name), {include_blank: true}) -%>
</div>
</div>
<br class="clear_both">
</div>
</div>
<div class="field">
<%= f.label :preparation_type %>
<br>
<%= f.select :preparation_type_id, options_from_collection_for_select(PreparationType.all, :id, :name, f.object.preparation_type_id), include_blank: true -%>
</div>
<div class="field">
<%= f.label :repository %>
<br>
<%= render partial: 'workbench/elements/forms/ajax_select',
locals: {controller: 'repositories',
object: 'collection_object',
method: 'repository_id',
tag_id: 'repository_id_for_collection_object',
display: repository_tag(@collection_object.repository)
} %>
</div>
<div class="field">
<%= f.label :collecting_event %>
<br>
<%= render partial: 'workbench/elements/forms/ajax_select',
locals: {controller: 'collecting_events',
object: 'collection_object',
method: 'collecting_event_id',
tag_id: 'collecting_event_id_for_collection_object',
display: collecting_event_tag(@collection_object.collecting_event)
} %>
</div>
<div class="field">
<%= f.label :accessioned_at %>
<br>
<%= f.date_field :accessioned_at -%>
</div>
<div class="field">
<%= f.label :deaccessioned_at %>
<br>
<%= f.date_field :deaccessioned_at -%>
</div>
<div class="field">
<%= f.label :deaccession_reason %>
<br>
<%= f.text_field :deaccession_reason -%>
</div>
</div>
<div class="item item2">
<div class="field">
<%= f.label :buffered_collecting_event %>
<br>
<%= f.text_area :buffered_collecting_event, cols: 40, rows: 6 -%>
</div>
<div class="field">
<%= f.label :buffered_determinations %>
<br>
<%= f.text_area :buffered_determinations, cols: 40, rows: 5 -%>
</div>
<div class="field">
<%= f.label :buffered_other_labels %>
<br>
<%= f.text_area :buffered_other_labels, cols: 40, rows: 6 -%>
</div>
</div>
</div>
<div class="actions">
<%= f.submit %>
</div>
<% end %>
<script >
$('#collection_object_deaccessioned_at').datepicker();
$('#collection_object_accessioned_at').datepicker();
</script>