102 lines
5.7 KiB
Plaintext
102 lines
5.7 KiB
Plaintext
<%= 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 %>
|
|
<%= form.form_group :minor do %>
|
|
<%= form.check_box :minor, label: t("helpers.label.talent_release.minor"), data: { target: "[data-ujs-target=guardian-fields]", toggle: "collapse" } %>
|
|
<% end %>
|
|
|
|
<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 %>
|
|
|
|
<div class="<%= class_string("collapse" => !acquired_media_release.minor?) %>" data-ujs-target="guardian-fields">
|
|
<%= card_field_set_tag t(".guardian_info.heading") do %>
|
|
<div class="form-row">
|
|
<%= form.text_field :guardian_first_name, required: acquired_media_release.minor?, wrapper_class: "col-sm-3" %>
|
|
<%= form.text_field :guardian_last_name, required: acquired_media_release.minor?, wrapper_class: "col-sm-3" %>
|
|
<%= form.phone_field :guardian_phone, wrapper_class: "col-sm-6" %>
|
|
<%= form.text_field :guardian_email, wrapper_class: "col-sm-6" %>
|
|
</div>
|
|
<%= render "shared/address_fields", form: form, subject: "guardian" %>
|
|
<% end %>
|
|
|
|
<%= card_field_set_tag t(".guardian_2_info.heading") do %>
|
|
<div class="form-row">
|
|
<%= form.text_field :guardian_2_first_name, wrapper_class: "col-sm-3" %>
|
|
<%= form.text_field :guardian_2_last_name, wrapper_class: "col-sm-3" %>
|
|
<%= form.phone_field :guardian_2_phone, wrapper_class: "col-sm-6" %>
|
|
<%= form.text_field :guardian_2_email, wrapper_class: "col-sm-6" %>
|
|
</div>
|
|
<%= render "shared/address_fields", form: form, subject: "guardian_2" %>
|
|
<% end %>
|
|
</div>
|
|
<% 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/releasable_files_dropzone", form: form, releasable: acquired_media_release %>
|
|
|
|
<div class="<%= class_string("collapse" => !acquired_media_release.minor?) %>" data-ujs-target="guardian-fields">
|
|
<br>
|
|
<div class="text-left">
|
|
<p><%= t(".photos.guardian_photo.heading") %></p>
|
|
<div id="guardian-photo-preview" class="d-inline-block mb-2" data-behavior="guardian-photo-preview" data-file-input="[data-ujs-target=guardian-photo-input]">
|
|
<div class="align-items-center d-flex photo-preview img-thumbnail justify-content-center">
|
|
<span>No photo yet</span>
|
|
</div>
|
|
</div>
|
|
<% if acquired_media_release.guardian_photo.attached? %>
|
|
<%= javascript_tag nonce: true do %>
|
|
App.PhotoPreview.set("#guardian-photo-preview", "<%= url_for(acquired_media_release.guardian_photo.variant(auto_orient: true, resize: '200x200')) %>");
|
|
<% end %>
|
|
<% end %>
|
|
<div class="d-inline-block">
|
|
<%= form.hidden_field :guardian_photo, value: form.object.guardian_photo.signed_id if acquired_media_release.guardian_photo.attached?%>
|
|
<%= form.file_field :guardian_photo, hide_label: true, data: { ujs_target: "guardian-photo-input" }, help: "PNG or JPG only", accept: acquired_media_release.class.face_photo_acceptable_content_types.join(",") %>
|
|
</div>
|
|
|
|
<p><%= t(".photos.guardian_2_photo.heading") %></p>
|
|
<div id="guardian-2-photo-preview" class="d-inline-block mb-2" data-behavior="guardian-photo-preview" data-file-input="[data-ujs-target=guardian-2-photo-input]">
|
|
<div class="align-items-center d-flex photo-preview img-thumbnail justify-content-center">
|
|
<span>No photo yet</span>
|
|
</div>
|
|
</div>
|
|
<% if acquired_media_release.guardian_2_photo.attached? %>
|
|
<%= javascript_tag nonce: true do %>
|
|
App.PhotoPreview.set("#guardian-2-photo-preview", "<%= url_for(acquired_media_release.guardian_2_photo.variant(auto_orient: true, resize: '200x200')) %>");
|
|
<% end %>
|
|
<% end %>
|
|
<div class="d-inline-block">
|
|
<%= form.hidden_field :guardian_2_photo, value: form.object.guardian_2_photo.signed_id if acquired_media_release.guardian_2_photo.attached?%>
|
|
<%= form.file_field :guardian_2_photo, hide_label: true, data: { ujs_target: "guardian-2-photo-input" }, help: "PNG or JPG only", accept: acquired_media_release.class.face_photo_acceptable_content_types.join(",") %>
|
|
</div>
|
|
</div>
|
|
<hr>
|
|
</div>
|
|
<% 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 %>
|