allow to make form field optional

This commit is contained in:
Alex Turchyn
2023-06-20 00:24:39 +03:00
parent 24380784a0
commit 4094bb03b7
12 changed files with 127 additions and 32 deletions
+2 -2
View File
@@ -1,5 +1,5 @@
<!DOCTYPE html>
<html data-theme="docuseal" class="h-full">
<html data-theme="docuseal">
<head>
<title>
Docuseal
@@ -11,7 +11,7 @@
<%= stylesheet_pack_tag 'application', media: 'all' %>
<%= yield :head %>
</head>
<body class="h-full">
<body>
<turbo-frame id="modal"></turbo-frame>
<%= render 'shared/navbar' %>
<% if flash.present? %>
+2 -2
View File
@@ -1,5 +1,5 @@
<!DOCTYPE html>
<html data-theme="docuseal" class="h-full">
<html data-theme="docuseal">
<head>
<title>
Docuseal
@@ -11,7 +11,7 @@
<%= stylesheet_pack_tag 'form', media: 'all' %>
<%= yield :head %>
</head>
<body class="h-full">
<body>
<%= yield %>
</body>
</html>
+2 -2
View File
@@ -2,12 +2,12 @@
<div class="space-y-6 mx-auto">
<div class="space-y-6">
<div class="flex items-center justify-center">
<div class="flex items-center">
<a href="/" class="flex items-center">
<div class="mr-3">
<%= render 'shared/logo', width: "50px", height: "50px"%>
</div>
<h1 class="text-5xl font-bold text-center">DocuSeal</h1>
</div>
</a>
</div>
<div class="flex items-center bg-base-300 rounded-xl p-4 mb-4">
<div class="flex items-center">
+1 -1
View File
@@ -1,7 +1,7 @@
<% attachment_field_uuids = @submitter.submission.template.fields.select { |f| f['type'].in?(%w[image signature file]) }.pluck('uuid') %>
<% values = @submitter.submission.submitters.reduce({}) { |acc, e| acc.merge(e.values) } %>
<% attachments = ActiveStorage::Attachment.where(uuid: values.values_at(*attachment_field_uuids).flatten).preload(:blob) %>
<div class="mx-auto block pb-72 select-none" style="max-width: 1000px">
<div class="mx-auto block pb-72" style="max-width: 1000px">
<div class="mt-4 flex">
<a href="<%= root_path %>" class="mx-auto text-2xl md:text-3xl font-bold items-center flex space-x-3">
<%= render 'shared/logo', class: 'w-9 h-9 md:w-12 md:h-12' %>