|
|
|
|
@ -1,6 +1,8 @@
|
|
|
|
|
<% fields_index = Templates.build_field_areas_index(@submitter.submission.template) %>
|
|
|
|
|
<% values = @submitter.submission.submitters.where.not(id: @submitter.id).reduce({}) { |acc, sub| acc.merge(sub.values) } %>
|
|
|
|
|
<% attachments_index = ActiveStorage::Attachment.where(record: @submitter.submission.submitters, name: :attachments).preload(:blob).index_by(&:uuid) %>
|
|
|
|
|
<div style="max-height: -webkit-fill-available;">
|
|
|
|
|
<div id="scrollbox">
|
|
|
|
|
<div class="mx-auto block pb-72" style="max-width: 1000px">
|
|
|
|
|
<div class="mt-4 flex">
|
|
|
|
|
<a href="<%= root_path %>" class="mx-auto text-2xl md:text-3xl font-bold items-center flex space-x-3">
|
|
|
|
|
@ -25,10 +27,12 @@
|
|
|
|
|
<% end %>
|
|
|
|
|
<%= render 'shared/attribution' %>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="fixed bottom-0 w-full h-0 z-20">
|
|
|
|
|
<div class="mx-auto" style="max-width: 1000px">
|
|
|
|
|
<div class="relative md:mx-32">
|
|
|
|
|
<div class="shadow-md bg-base-100 absolute bottom-0 md:bottom-4 w-full border border-base-200 border p-4 rounded">
|
|
|
|
|
<div id="form_container" class="shadow-md bg-base-100 absolute bottom-0 md:bottom-4 w-full border border-base-200 border p-4 rounded">
|
|
|
|
|
<submission-form data-submitter-uuid="<%= @submitter.uuid %>" data-submitter-slug="<%= @submitter.slug %>" data-can-send-email="<%= Accounts.can_send_emails?(Struct.new(:id).new(@submitter.submission.template.account_id)) %>" data-attachments="<%= attachments_index.values.select { |e| e.record_id == @submitter.id }.to_json(only: %i[uuid], methods: %i[url filename content_type]) %>" data-fields="<%= @submitter.submission.template.fields.select { |f| f['submitter_uuid'] == @submitter.uuid }.to_json %>" data-values="<%= @submitter.values.to_json %>" data-authenticity-token="<%= form_authenticity_token %>"></submission-form>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|