<%= errors_summary_for acquired_media_release %>
<%= bootstrap_form_with model: model, local: true do |form| %>
  <%= field_set_tag content_tag(:span, t(".acquired_media_details.heading"), class: "h6 text-muted text-uppercase") do %>
    <div class="form-row">
      <%= form.text_field :name, required: true, wrapper_class: "col-12" %>
    </div>
    <%= form.form_group :categories, label: { text: "Licensed property type" } do %>
      <% AcquiredMediaRelease::CATEGORIES.each do |category| %>
        <%= form.check_box :categories, { multiple: true, label: category }, category, false %>
      <% end %>
    <% end %>
  <% end %>

  <hr>

  <%= field_set_tag content_tag(:span, t(".files.heading"), class: "h6 text-muted text-uppercase") do %>
    <div class="alert alert-warning text-center text-md-left">
      <%= fa_icon "warning" %>
      <strong>For optimal accuracy, please ensure video file names and photo file names match the source file name in the editing sequence.</strong>
    </div>
    <%= render "shared/file_infos_dropzone", form: form, releasable: acquired_media_release %>
  <% end %>

  <hr>

  <%= field_set_tag content_tag(:span, t(".contract_and_rights.heading"), class: "h6 text-muted text-uppercase") do %>
    <%= render "shared/contract_fields", form: form, release: acquired_media_release %>
    <%= render "shared/exploitable_rights_fields", form: form %>
  <% end %>

  <div class="row align-items-center text-center mt-4">
    <%= link_to t("shared.cancel"), [acquired_media_release.project, :acquired_media_releases], class: "col-3 text-reset" %>
    <div class="col-9">
      <%= form.button id: "submit_release", class: class_string("btn btn-block", ["btn-success", "btn-primary"] => acquired_media_release.new_record?), data: { disable_with: t("shared.disable_with") } %>
    </div>
  </div>
<% end %>
