Files
docuseal/app/views/submissions/_submitters_order.html.erb
T

16 lines
1.1 KiB
Plaintext
Raw Normal View History

2026-03-27 17:03:12 +02:00
<% if template.preferences['submitters_order'] == 'preserved' || template.submitters.any? { |s| s['order'] } || (template.submitters.size > 1 && template.fields.any? { |f| f['type'] == 'verification' }) %>
2024-09-26 12:19:33 +03:00
<%= f.hidden_field :preserve_order, value: '1' %>
<% elsif template.submitters.size > 1 %>
2026-06-24 11:31:15 +03:00
<% account_submissions = template.submissions.where(account_id: current_account.id) %>
<% last_submission = account_submissions.active.last || account_submissions.archived.last %>
2023-09-10 02:10:01 +03:00
<div class="form-control">
<%= f.label :preserve_order, for: uuid = SecureRandom.uuid, class: 'flex items-center cursor-pointer' do %>
2026-06-24 11:31:15 +03:00
<%= f.check_box :preserve_order, id: uuid, class: 'base-checkbox', checked: last_submission&.submitters_order.in?(['preserved', nil]) %>
2024-09-18 19:47:47 +03:00
<span class="label"><%= t('preserve_order') %></span>
2024-09-23 11:38:08 +03:00
<span class="tooltip" data-tip="<%= t('when_checked_notifications_will_be_sent_to_the_second_party_once_the_form_is_completed_by_the_previous_party_uncheck_this_option_to_send_notifications_to_all_parties_simultaneously_right_away') %>">
2023-09-10 02:10:01 +03:00
<%= svg_icon('info_circle', class: 'w-4 h-4') %>
</span>
<% end %>
</div>
<% end %>