Skip to content

Commit

Permalink
fix naming
Browse files Browse the repository at this point in the history
  • Loading branch information
omohokcoj committed Jun 2, 2024
1 parent e9a7590 commit 37a9a86
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion app/javascript/draw.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import SignaturePad from 'signature_pad'
import { cropCanvasAndExportToPNG } from './submission_form/crop_canvas'

window.customElements.define('signature-form', class extends HTMLElement {
window.customElements.define('draw-signature', class extends HTMLElement {
connectedCallback () {
const scale = 3

Expand Down
4 changes: 2 additions & 2 deletions app/views/submit_form_draw_signature/show.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<%= render 'shared/posthog' if ENV['POSTHOG_TOKEN'] %>
</head>
<body>
<signature-form data-slug="<%= params[:slug] %>" class="flex items-center h-screen p-2 justify-center">
<draw-signature data-slug="<%= params[:slug] %>" class="flex items-center h-screen p-2 justify-center">
<%= 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">
Expand Down Expand Up @@ -46,6 +46,6 @@
Return back to your desktop device to complete the form or <a class="link" href="<%= submit_form_path(params[:slug]) %>">continue on mobile</a>
</div>
</div>
</signature-form>
</draw-signature>
</body>
</html>

0 comments on commit 37a9a86

Please sign in to comment.