add initials field

This commit is contained in:
Alex Turchyn
2023-09-20 00:13:14 +03:00
parent dc02964d9b
commit ee350324e5
14 changed files with 426 additions and 29 deletions
+1 -1
View File
@@ -1,5 +1,5 @@
<div class="flex absolute text-[1.5vw] lg:text-base" style="width: <%= area['w'] * 100 %>%; height: <%= area['h'] * 100 %>%; left: <%= area['x'] * 100 %>%; top: <%= area['y'] * 100 %>%">
<% if field['type'].in?(['signature', 'image']) %>
<% if field['type'].in?(['signature', 'image', 'initials']) %>
<img class="object-contain mx-auto" src="<%= attachments_index[value].url %>" loading="lazy">
<% elsif field['type'] == 'file' %>
<div class="px-0.5 flex flex-col justify-center">
+2 -2
View File
@@ -136,8 +136,8 @@
<%= field['name'].presence || "#{field['type'].titleize} Field #{submitter_field_counters[field['type']]}" %>
</div>
<div>
<% if field['type'] == 'signature' %>
<div class="w-full bg-base-300">
<% if field['type'].in?(%w[signature initials]) %>
<div class="w-full bg-base-300 py-1">
<img class="object-contain mx-auto" height="<%= attachments_index[value].metadata['height'] %>" width="<%= attachments_index[value].metadata['width'] %>" src="<%= attachments_index[value].url %>" loading="lazy">
</div>
<% elsif field['type'] == 'image' %>