<%= form.errors %>

<%= form.label :person_id, 'Person' %>
<%= form.select :person_id,
                options_from_collection_for_select(Person.all, 'id', 'name', form.object.person_id),
                {include_blank: true},
                class: 'chzn-select',
                data: { placeholder: "Choose person..." },
                disabled: !form.object.new_record? %>

<% if form.object.new_record? %>
  <p>Once an appointment has been created the person cannot be changed, to preserve this person's relationship to any associated speeches.</p>
<% end %>

<%= form.label :started_at %>
<%= form.date_select :started_at, { include_blank: true, start_year: 1990 }, { :class => "date" } %>

<% if params[:make_current].blank? %>
  <%= form.label :ended_at %>
  <%= form.date_select :ended_at, { include_blank: true, start_year: 1990 }, { :class => "date" } %>
<% end %>

<% if params[:make_current] %>
  <%= form.hidden_field :make_current, value: true %>
<% end %>

<%= form.errors %>

<%= form.label :person_id, 'Person' %>
<%= form.select :person_id,
                options_from_collection_for_select(Person.all, 'id', 'name', form.object.person_id),
                {include_blank: true},
                class: 'chzn-select',
                data: { placeholder: "Choose person..." },
                disabled: !form.object.new_record? %>

<% if form.object.new_record? %>
  <p>Once an appointment has been created the person cannot be changed, to preserve this person's relationship to any associated speeches.</p>
<% end %>

<%= form.label :started_at %>
<%= form.date_select :started_at, { include_blank: true, start_year: 1730 }, { :class => "date" } %>

<% if params[:make_current].blank? %>
  <%= form.label :ended_at %>
  <%= form.date_select :ended_at, { include_blank: true, start_year: 1730 }, { :class => "date" } %>
<% end %>

<% if params[:make_current] %>
  <%= form.hidden_field :make_current, value: true %>
<% end %>

Allow role appointments to have older dates...
Allow role appointments to have older dates...

... so we can add the historical accounts dating back to 1700s.
