This commit is contained in:
Oleksandr Turchyn
2024-09-18 19:47:47 +03:00
committed by Oleksandr Turchyn
parent 3c60fb4ee6
commit e9d728fa4a
132 changed files with 1121 additions and 600 deletions
@@ -19,31 +19,31 @@
<%= form_for '', url: submit_form_path(params[:slug]), html: { style: 'max-width: 900px; width: 100%; margin-bottom: 120px' }, method: :put do |f| %>
<input value="" type="hidden" name="values[<%= (@submitter.submission.template_fields || @submitter.template.fields).find { |f| f['type'] == 'signature' && f['uuid'].starts_with?(params[:f]) }['uuid'] %>]">
<div class="font-semibold text-4xl text-center w-full mb-2">
Draw Signature
<%= t('draw_signature') %>
</div>
<div class="w-full bg-white rounded-2xl border relative" style="height: 300px">
<canvas class="w-full"></canvas>
<button aria-label="Clear" class="btn btn-ghost btn-sm font-medium top-0 right-0 absolute mt-1 mr-1">
<button aria-label="<%= t('clear') %>" class="btn btn-ghost btn-sm font-medium top-0 right-0 absolute mt-1 mr-1">
<%= svg_icon('reload', class: 'w-5 h-5') %>
<span class="inline">Clear</span>
<span class="inline"><%= t('clear') %></span>
</button>
</div>
<div class="mt-4">
<button disabled class="base-button w-full">
Submit
<%= t('submit') %>
</button>
<%= f.button button_title(title: 'Submit'), class: 'base-button w-full', style: 'display: none' %>
<%= f.button button_title(title: t('submit')), class: 'base-button w-full', style: 'display: none' %>
</div>
<% end %>
<div id="success" class="text-center p-2 hidden" style="margin-bottom: 100px">
<div class="flex items-center space-x-1 items-center justify-center text-2xl font-semibold mb-2">
<%= svg_icon('circle_check', class: 'text-green-600') %>
<span>
Signature Uploaded
<%= t('signature_uploaded') %>
</span>
</div>
<div>
Return back to your desktop device to complete the form or <a class="link" href="<%= submit_form_path(params[:slug]) %>">continue on mobile</a>
<%= t('return_back_to_your_desktop_device_to_complete_the_form_or_continue_on_mobile_html', link: submit_form_path(params[:slug])) %>
</div>
</div>
</draw-signature>