%= form_with model: [aircraft, squawk], multipart: true, class: "card card-body space-y-4 max-w-2xl" do |f| %> <%= f.errors_summary %> <%= f.field :priority, as: :select, collection: Squawk::PRIORITIES.invert, hint: t(".ground_aircraft_makes_the_aircraft") %> <%= f.field :issue_reported, as: :textarea, label: t(".issue"), required: true, autofocus: true %> <%= f.field :component_id, as: :select, label: t(".component_optional"), collection: component_options(aircraft) %> <%= f.field :attachments, as: :file, multiple: true, label: squawk.attachments.attached? ? t(".add_photos_files") : t(".photos_files"), hint: t(".select_several_at_once_images", max_upload_mb: Setting.max_upload_mb) %> <% if squawk.persisted? && squawk.attachments.attached? %>
<%= t(".remove_attached_files") %>
<% squawk.attachments.each do |file| %> <% end %>