|
|
|
@ -21,21 +21,32 @@
|
|
|
|
<h1 class="text-xl md:text-2xl font-medium focus:text-clip" style="width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;">
|
|
|
|
<h1 class="text-xl md:text-2xl font-medium focus:text-clip" style="width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;">
|
|
|
|
<%= @submitter.submission.name || @submitter.submission.template.name %>
|
|
|
|
<%= @submitter.submission.name || @submitter.submission.template.name %>
|
|
|
|
</h1>
|
|
|
|
</h1>
|
|
|
|
<div class="flex items-center space-x-2" style="margin-left: 20px; flex-shrink: 0">
|
|
|
|
<div class="flex items-center gap-2 group" style="margin-left: 20px; flex-shrink: 0">
|
|
|
|
<span id="complete_button_container"></span>
|
|
|
|
<% decline_modal_id = nil %>
|
|
|
|
|
|
|
|
<% if @form_configs[:with_decline] %>
|
|
|
|
|
|
|
|
<modal-button data-target="<%= decline_modal_id = SecureRandom.uuid %>" class="hidden group-has-[.complete-button]:flex">
|
|
|
|
|
|
|
|
<button type="button" class="btn btn-sm md:!px-5 px-2" aria-label="<%= t(:decline) %>">
|
|
|
|
|
|
|
|
<span class="hidden md:inline"><%= t(:decline) %></span>
|
|
|
|
|
|
|
|
<span class="inline md:hidden">
|
|
|
|
|
|
|
|
<%= svg_icon('x', class: 'w-5 h-5') %>
|
|
|
|
|
|
|
|
</span>
|
|
|
|
|
|
|
|
</button>
|
|
|
|
|
|
|
|
</modal-button>
|
|
|
|
|
|
|
|
<% end %>
|
|
|
|
|
|
|
|
<span id="complete_button_container" class="peer contents"></span>
|
|
|
|
<% if @form_configs[:with_delegate] %>
|
|
|
|
<% if @form_configs[:with_delegate] %>
|
|
|
|
<modal-button data-target="<%= delegate_modal_id = SecureRandom.uuid %>">
|
|
|
|
<modal-button data-target="<%= delegate_modal_id = SecureRandom.uuid %>" class="hidden peer-empty:flex">
|
|
|
|
<button id="delegate_button" type="button" class="btn btn-sm !px-5"><%= t(:delegate) %></button>
|
|
|
|
<button id="delegate_button" type="button" class="btn btn-sm !px-5"><%= t(:delegate) %></button>
|
|
|
|
</modal-button>
|
|
|
|
</modal-button>
|
|
|
|
<% if @form_configs[:with_decline] %>
|
|
|
|
<% if @form_configs[:with_decline] %>
|
|
|
|
<modal-button data-target="<%= decline_modal_id = SecureRandom.uuid %>">
|
|
|
|
<modal-button data-target="<%= decline_modal_id %>" class="hidden peer-empty:flex">
|
|
|
|
<button id="decline_button" type="button" class="btn btn-sm px-2" aria-label="<%= t(:decline) %>">
|
|
|
|
<button id="decline_button" type="button" class="btn btn-sm px-2" aria-label="<%= t(:decline) %>">
|
|
|
|
<%= svg_icon('x', class: 'w-5 h-5') %>
|
|
|
|
<%= svg_icon('x', class: 'w-5 h-5') %>
|
|
|
|
</button>
|
|
|
|
</button>
|
|
|
|
</modal-button>
|
|
|
|
</modal-button>
|
|
|
|
<% end %>
|
|
|
|
<% end %>
|
|
|
|
<% if @form_configs[:with_partial_download] %>
|
|
|
|
<% if @form_configs[:with_partial_download] %>
|
|
|
|
<download-button role="button" tabindex="0" data-src="<%= submit_form_download_index_path(@submitter.slug) %>" class="btn btn-neutral text-white btn-sm px-2" title="<%= t('download') %>" aria-label="<%= t('download') %>">
|
|
|
|
<download-button role="button" tabindex="0" data-src="<%= submit_form_download_index_path(@submitter.slug) %>" class="btn btn-neutral text-white btn-sm px-2 hidden peer-empty:flex" title="<%= t('download') %>" aria-label="<%= t('download') %>">
|
|
|
|
<span data-target="download-button.defaultButton">
|
|
|
|
<span data-target="download-button.defaultButton">
|
|
|
|
<%= svg_icon('download', class: 'w-5 h-5') %>
|
|
|
|
<%= svg_icon('download', class: 'w-5 h-5') %>
|
|
|
|
</span>
|
|
|
|
</span>
|
|
|
|
@ -46,12 +57,12 @@
|
|
|
|
<% end %>
|
|
|
|
<% end %>
|
|
|
|
<% else %>
|
|
|
|
<% else %>
|
|
|
|
<% if @form_configs[:with_decline] %>
|
|
|
|
<% if @form_configs[:with_decline] %>
|
|
|
|
<modal-button data-target="<%= decline_modal_id = SecureRandom.uuid %>">
|
|
|
|
<modal-button data-target="<%= decline_modal_id %>" class="hidden peer-empty:flex">
|
|
|
|
<button id="decline_button" type="button" class="btn btn-sm !px-5"><%= t(:decline) %></button>
|
|
|
|
<button id="decline_button" type="button" class="btn btn-sm !px-5"><%= t(:decline) %></button>
|
|
|
|
</modal-button>
|
|
|
|
</modal-button>
|
|
|
|
<% end %>
|
|
|
|
<% end %>
|
|
|
|
<% if @form_configs[:with_partial_download] %>
|
|
|
|
<% if @form_configs[:with_partial_download] %>
|
|
|
|
<download-button role="button" tabindex="0" data-src="<%= submit_form_download_index_path(@submitter.slug) %>" class="btn btn-neutral text-white btn-sm !px-4" aria-label="<%= t('download') %>">
|
|
|
|
<download-button role="button" tabindex="0" data-src="<%= submit_form_download_index_path(@submitter.slug) %>" class="btn btn-neutral text-white btn-sm !px-4 hidden peer-empty:flex" aria-label="<%= t('download') %>">
|
|
|
|
<span class="flex items-center justify-center" data-target="download-button.defaultButton">
|
|
|
|
<span class="flex items-center justify-center" data-target="download-button.defaultButton">
|
|
|
|
<%= svg_icon('download', class: 'w-6 h-6 inline md:hidden') %>
|
|
|
|
<%= svg_icon('download', class: 'w-6 h-6 inline md:hidden') %>
|
|
|
|
<span class="hidden md:inline"><%= t('download') %></span>
|
|
|
|
<span class="hidden md:inline"><%= t('download') %></span>
|
|
|
|
@ -65,10 +76,17 @@
|
|
|
|
<% end %>
|
|
|
|
<% end %>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</header>
|
|
|
|
</header>
|
|
|
|
<scroll-buttons inert class="fixed right-5 top-2 hidden md:flex gap-1 z-50 ease-in-out opacity-0 -translate-y-10">
|
|
|
|
<scroll-buttons inert class="fixed right-5 top-2 hidden md:flex gap-1 z-50 ease-in-out opacity-0 -translate-y-10 group">
|
|
|
|
<span id="complete_button_container_mobile"></span>
|
|
|
|
<% if @form_configs[:with_decline] %>
|
|
|
|
|
|
|
|
<modal-button data-target="<%= decline_modal_id %>" class="hidden group-has-[.complete-button]:flex">
|
|
|
|
|
|
|
|
<button type="button" class="btn btn-sm px-2" aria-label="<%= t(:decline) %>">
|
|
|
|
|
|
|
|
<%= svg_icon('x', class: 'w-5 h-5') %>
|
|
|
|
|
|
|
|
</button>
|
|
|
|
|
|
|
|
</modal-button>
|
|
|
|
|
|
|
|
<% end %>
|
|
|
|
|
|
|
|
<span id="complete_button_container_scroll" class="peer contents"></span>
|
|
|
|
<% if @form_configs[:with_delegate] %>
|
|
|
|
<% if @form_configs[:with_delegate] %>
|
|
|
|
<modal-button data-target="<%= delegate_modal_id %>">
|
|
|
|
<modal-button data-target="<%= delegate_modal_id %>" class="hidden peer-empty:flex">
|
|
|
|
<button id="delegate_button_mobile" type="button" class="btn btn-sm px-0" aria-label="<%= t(:delegate) %>">
|
|
|
|
<button id="delegate_button_mobile" type="button" class="btn btn-sm px-0" aria-label="<%= t(:delegate) %>">
|
|
|
|
<span class="min-[1366px]:inline hidden px-3">
|
|
|
|
<span class="min-[1366px]:inline hidden px-3">
|
|
|
|
<%= t(:delegate) %>
|
|
|
|
<%= t(:delegate) %>
|
|
|
|
@ -79,23 +97,15 @@
|
|
|
|
</button>
|
|
|
|
</button>
|
|
|
|
</modal-button>
|
|
|
|
</modal-button>
|
|
|
|
<% if @form_configs[:with_decline] %>
|
|
|
|
<% if @form_configs[:with_decline] %>
|
|
|
|
<modal-button data-target="<%= decline_modal_id %>">
|
|
|
|
<modal-button data-target="<%= decline_modal_id %>" class="hidden peer-empty:flex">
|
|
|
|
<button id="decline_button_mobile" type="button" class="btn btn-sm px-2" aria-label="<%= t(:decline) %>">
|
|
|
|
<button id="decline_button_mobile" type="button" class="btn btn-sm px-2" aria-label="<%= t(:decline) %>">
|
|
|
|
<%= svg_icon('x', class: 'w-5 h-5') %>
|
|
|
|
<%= svg_icon('x', class: 'w-5 h-5') %>
|
|
|
|
</button>
|
|
|
|
</button>
|
|
|
|
</modal-button>
|
|
|
|
</modal-button>
|
|
|
|
<% end %>
|
|
|
|
<% end %>
|
|
|
|
<download-button role="button" tabindex="0" data-src="<%= submit_form_download_index_path(@submitter.slug) %>" class="btn btn-neutral text-white btn-sm px-2" aria-label="<%= t('download') %>">
|
|
|
|
|
|
|
|
<span data-target="download-button.defaultButton">
|
|
|
|
|
|
|
|
<%= svg_icon('download', class: 'w-5 h-5') %>
|
|
|
|
|
|
|
|
</span>
|
|
|
|
|
|
|
|
<span class="hidden" data-target="download-button.loadingButton">
|
|
|
|
|
|
|
|
<%= svg_icon('loader', class: 'w-5 h-5 animate-spin') %>
|
|
|
|
|
|
|
|
</span>
|
|
|
|
|
|
|
|
</download-button>
|
|
|
|
|
|
|
|
<% else %>
|
|
|
|
<% else %>
|
|
|
|
<% if @form_configs[:with_decline] %>
|
|
|
|
<% if @form_configs[:with_decline] %>
|
|
|
|
<modal-button data-target="<%= decline_modal_id %>">
|
|
|
|
<modal-button data-target="<%= decline_modal_id %>" class="hidden peer-empty:flex">
|
|
|
|
<button id="decline_button_mobile" type="button" class="btn btn-sm px-0" aria-label="<%= t(:decline) %>">
|
|
|
|
<button id="decline_button_mobile" type="button" class="btn btn-sm px-0" aria-label="<%= t(:decline) %>">
|
|
|
|
<span class="min-[1366px]:inline hidden px-3">
|
|
|
|
<span class="min-[1366px]:inline hidden px-3">
|
|
|
|
<%= t(:decline) %>
|
|
|
|
<%= t(:decline) %>
|
|
|
|
@ -106,15 +116,15 @@
|
|
|
|
</button>
|
|
|
|
</button>
|
|
|
|
</modal-button>
|
|
|
|
</modal-button>
|
|
|
|
<% end %>
|
|
|
|
<% end %>
|
|
|
|
<download-button role="button" tabindex="0" data-src="<%= submit_form_download_index_path(@submitter.slug) %>" class="btn btn-neutral text-white btn-sm px-2" aria-label="<%= t('download') %>">
|
|
|
|
|
|
|
|
<span data-target="download-button.defaultButton">
|
|
|
|
|
|
|
|
<%= svg_icon('download', class: 'w-5 h-5') %>
|
|
|
|
|
|
|
|
</span>
|
|
|
|
|
|
|
|
<span class="hidden" data-target="download-button.loadingButton">
|
|
|
|
|
|
|
|
<%= svg_icon('loader', class: 'w-5 h-5 animate-spin') %>
|
|
|
|
|
|
|
|
</span>
|
|
|
|
|
|
|
|
</download-button>
|
|
|
|
|
|
|
|
<% end %>
|
|
|
|
<% end %>
|
|
|
|
|
|
|
|
<download-button role="button" tabindex="0" data-src="<%= submit_form_download_index_path(@submitter.slug) %>" class="btn btn-neutral text-white btn-sm px-2 hidden peer-empty:flex" aria-label="<%= t('download') %>">
|
|
|
|
|
|
|
|
<span data-target="download-button.defaultButton">
|
|
|
|
|
|
|
|
<%= svg_icon('download', class: 'w-5 h-5') %>
|
|
|
|
|
|
|
|
</span>
|
|
|
|
|
|
|
|
<span class="hidden" data-target="download-button.loadingButton">
|
|
|
|
|
|
|
|
<%= svg_icon('loader', class: 'w-5 h-5 animate-spin') %>
|
|
|
|
|
|
|
|
</span>
|
|
|
|
|
|
|
|
</download-button>
|
|
|
|
</scroll-buttons>
|
|
|
|
</scroll-buttons>
|
|
|
|
<% end %>
|
|
|
|
<% end %>
|
|
|
|
<% schema.each do |item| %>
|
|
|
|
<% schema.each do |item| %>
|
|
|
|
|