<%= form_for @changeset, @action, fn f -> %>
  <%= if @changeset.action do %>
    <div class="alert alert-danger">
      <p>Oops, something went wrong! Please check the errors below.</p>
    </div>
  <% end %>

  <%= label f, :time %>
  <%= datetime_select f, :time %>
  <%= error_tag f, :time %>

  <%= label f, :location_id %>
  <%= select f, :location_id, Runosaari.Area.list_locations |> Enum.map(fn loc -> {loc.name, loc.id} end)%>
  <%= error_tag f, :location_id %>

  <%= label f, :performer_id %>
  <%= multiple_select f, :performer_id, Runosaari.Registration.list_performers |> Enum.map(fn perf -> {perf.fname <> " " <> perf.lname, perf.id} end) %>
  <%= error_tag f, :performer_id %>

  <%= label f, :description %>
  <%= text_input f, :description %>
  <%= error_tag f, :description %>

  <%= label f, :desc %>
  <%= text_input f, :desc %>
  <%= error_tag f, :desc %>

  <div>
    <%= submit "Save" %>
  </div>
<% end %>
