Compare commits

...
53 Commits
Author SHA1 Message Date
Alex Turchyn 4f94858901 Merge from docusealco/wip 2025-06-30 12:56:05 +03:00
Pete Matsyburka d0ac4ad222 fix sqlite remove template 2025-06-30 11:44:55 +03:00
Pete Matsyburka 10e4476f4a fix signature prefill 2025-06-30 11:41:07 +03:00
Pete Matsyburka 74411d883a adjust link default parties 2025-06-29 12:31:41 +03:00
Alex Turchyn 18ee2d5316 add shared link form fields preferences 2025-06-28 23:06:25 +03:00
Pete Matsyburka b4f80422eb update doc 2025-06-28 13:30:05 +03:00
Pete Matsyburka 7fe9ab7601 update params 2025-06-28 10:37:10 +03:00
Pete Matsyburka 13ad614e6b fix rubocop 2025-06-28 10:17:50 +03:00
Alex Turchyn 7b1b4bcf2c show shared link enable button on disabled link page 2025-06-28 09:58:22 +03:00
Alex Turchyn a6715d4034 add meta description translations 2025-06-27 23:25:52 +03:00
Pete Matsyburka 254995c6c6 fix missing font variant 2025-06-27 14:45:29 +03:00
Pete Matsyburka 0e33e23d1f fix prefill condition 2025-06-27 12:49:25 +03:00
Pete Matsyburka 57503eefd2 adjust search index 2025-06-27 12:08:57 +03:00
Pete Matsyburka cd477c880c render image as file 2025-06-26 21:50:12 +03:00
Pete Matsyburka bf2f5b24dc update docs 2025-06-26 17:19:53 +03:00
Pete Matsyburka 7eba4865bc fix signature remember 2025-06-26 11:28:38 +03:00
Pete Matsyburka 64cd24a24d validate blank images 2025-06-26 11:04:25 +03:00
Pete Matsyburka de5acd0949 fix one-off 2025-06-26 10:05:16 +03:00
Pete Matsyburka 6ebbc3edac pdfium read text 2025-06-26 09:51:09 +03:00
Pete Matsyburka 2020f6c136 make shared templates searchable 2025-06-26 07:47:29 +03:00
Pete Matsyburka ee4acd5a82 validate signature image 2025-06-25 22:31:19 +03:00
Pete Matsyburka 2e487ac936 fix timezone selector 2025-06-25 21:36:03 +03:00
Pete Matsyburka dee5fc7c07 fix preview 2025-06-25 16:34:25 +03:00
Pete Matsyburka e130584fec fix timezone selector 2025-06-25 09:38:52 +03:00
Pete Matsyburka ade5c4832f fix bulk table mappings 2025-06-24 12:49:52 +03:00
Pete Matsyburka 33b14d5278 fix sqlite query 2025-06-23 20:34:30 +03:00
Pete Matsyburka 48e73c2c81 fix png quality 2025-06-23 14:53:35 +03:00
Pete Matsyburka 894d98e92b update widget version 2025-06-23 13:33:44 +03:00
Alex Turchyn 14c84eff93 Merge from docusealco/wip 2025-06-23 13:19:06 +03:00
Pete Matsyburka 01d982b093 embed preview toggle 2025-06-22 14:54:12 +03:00
Pete Matsyburka 35852ef6ab add onprem search reindex 2025-06-21 23:04:11 +03:00
Pete Matsyburka 47b235dc5f fix search 2025-06-21 22:17:54 +03:00
Pete Matsyburka 0e11d2a581 fix tour link 2025-06-21 17:11:26 +03:00
Pete Matsyburka e57e11f206 optimize query 2025-06-21 14:58:20 +03:00
Alex Turchyn 51f639065c add translations 2025-06-20 21:14:22 +03:00
Pete Matsyburka 6c1d4b466f adjust server selector 2025-06-20 13:41:42 +03:00
Pete Matsyburka b940c597dc fix pdfium error 2025-06-20 02:16:31 +03:00
Pete Matsyburka 1ce67bcb39 adjust folder autocomplete 2025-06-19 22:49:47 +03:00
Pete Matsyburka 5050a67d08 add datenow type 2025-06-19 19:58:22 +03:00
Pete Matsyburka 76321cef3c optimize autocomplete 2025-06-19 16:06:35 +03:00
Pete Matsyburka 8f3a203994 markdown link 2025-06-19 12:45:44 +03:00
Pete Matsyburka ea24562861 fix time format 2025-06-19 12:25:35 +03:00
Pete Matsyburka 4a888d048e fix empty file generate 2025-06-19 12:06:08 +03:00
Alex Turchyn 36331bb993 show found submissions when searching on templates 2025-06-19 12:05:43 +03:00
Pete Matsyburka 6f0e7c0ca8 skip autocomplete 2025-06-18 23:53:36 +03:00
Pete Matsyburka 2491b7b7e3 adjust indexes 2025-06-18 11:56:42 +03:00
Pete Matsyburka 7965c17f46 fix serializer 2025-06-17 18:03:28 +03:00
Pete Matsyburka 5519459519 refactor 2025-06-17 12:42:57 +03:00
Pete Matsyburka d8bf2cc101 add index 2025-06-17 11:03:40 +03:00
Pete Matsyburka 2aece98d67 add pro routes 2025-06-16 22:37:50 +03:00
Pete Matsyburka f602497255 require all submitters 2025-06-16 22:17:14 +03:00
Pete Matsyburka 11db68cdc7 fix merge 2025-06-16 18:55:23 +03:00
Pete Matsyburka bed98f4344 optimize query 2025-06-16 17:02:05 +03:00
98 changed files with 15590 additions and 287 deletions

No files matched your search

+1 -1
View File
@@ -66,7 +66,7 @@ RSpec/ExampleLength:
Max: 50 Max: 50
RSpec/MultipleMemoizedHelpers: RSpec/MultipleMemoizedHelpers:
Max: 9 Max: 15
Metrics/BlockNesting: Metrics/BlockNesting:
Max: 5 Max: 5
@@ -10,6 +10,12 @@ module Api
def create def create
submitter = Submitter.find_by!(slug: params[:submitter_slug]) submitter = Submitter.find_by!(slug: params[:submitter_slug])
if params[:type].in?(%w[initials signature]) && ImageUtils.blank?(Vips::Image.new_from_file(params[:file].path))
Rollbar.error("Empty signature: #{submitter.id}") if defined?(Rollbar)
return render json: { error: "#{params[:type]} is empty" }, status: :unprocessable_entity
end
attachment = Submitters.create_attachment!(submitter, params) attachment = Submitters.create_attachment!(submitter, params)
if params[:remember_signature] == 'true' && submitter.email.present? if params[:remember_signature] == 'true' && submitter.email.present?
@@ -112,7 +112,9 @@ module Api
submissions = submissions.where(slug: params[:slug]) if params[:slug].present? submissions = submissions.where(slug: params[:slug]) if params[:slug].present?
if params[:template_folder].present? if params[:template_folder].present?
submissions = submissions.joins(template: :folder).where(folder: { name: params[:template_folder] }) folder = TemplateFolder.accessible_by(current_ability).find_by(name: params[:template_folder])
submissions = folder ? submissions.joins(:template).where(template: { folder_id: folder.id }) : submissions.none
end end
if params.key?(:archived) if params.key?(:archived)
@@ -185,11 +187,12 @@ module Api
def submissions_params def submissions_params
permitted_attrs = [ permitted_attrs = [
:send_email, :send_sms, :bcc_completed, :completed_redirect_url, :reply_to, :go_to_last, :send_email, :send_sms, :bcc_completed, :completed_redirect_url, :reply_to, :go_to_last,
:expire_at, :name, :require_phone_2fa, :expire_at, :name,
{ {
message: %i[subject body], message: %i[subject body],
submitters: [[:send_email, :send_sms, :completed_redirect_url, :uuid, :name, :email, :role, submitters: [[:send_email, :send_sms, :completed_redirect_url, :uuid, :name, :email, :role,
:completed, :phone, :application_key, :external_id, :reply_to, :go_to_last, :completed, :phone, :application_key, :external_id, :reply_to, :go_to_last,
:require_phone_2fa,
{ metadata: {}, values: {}, roles: [], readonly_fields: [], message: %i[subject body], { metadata: {}, values: {}, roles: [], readonly_fields: [], message: %i[subject body],
fields: [:name, :uuid, :default_value, :value, :title, :description, fields: [:name, :uuid, :default_value, :value, :title, :description,
:readonly, :required, :validation_pattern, :invalid_message, :readonly, :required, :validation_pattern, :invalid_message,
+5 -1
View File
@@ -82,7 +82,7 @@ module Api
submitter_params.permit( submitter_params.permit(
:send_email, :send_sms, :reply_to, :completed_redirect_url, :uuid, :name, :email, :role, :send_email, :send_sms, :reply_to, :completed_redirect_url, :uuid, :name, :email, :role,
:completed, :phone, :application_key, :external_id, :go_to_last, :completed, :phone, :application_key, :external_id, :go_to_last, :require_phone_2fa,
{ metadata: {}, values: {}, readonly_fields: [], message: %i[subject body], { metadata: {}, values: {}, readonly_fields: [], message: %i[subject body],
fields: [[:name, :uuid, :default_value, :value, :required, fields: [[:name, :uuid, :default_value, :value, :required,
:readonly, :validation_pattern, :invalid_message, :readonly, :validation_pattern, :invalid_message,
@@ -193,6 +193,10 @@ module Api
submitter.preferences['send_sms'] = submitter_preferences['send_sms'] if submitter_preferences.key?('send_sms') submitter.preferences['send_sms'] = submitter_preferences['send_sms'] if submitter_preferences.key?('send_sms')
submitter.preferences['reply_to'] = submitter_preferences['reply_to'] if submitter_preferences.key?('reply_to') submitter.preferences['reply_to'] = submitter_preferences['reply_to'] if submitter_preferences.key?('reply_to')
if submitter_preferences.key?('require_phone_2fa')
submitter.preferences['require_phone_2fa'] = submitter_preferences['require_phone_2fa']
end
if submitter_preferences.key?('go_to_last') if submitter_preferences.key?('go_to_last')
submitter.preferences['go_to_last'] = submitter_preferences['go_to_last'] submitter.preferences['go_to_last'] = submitter_preferences['go_to_last']
end end
+6 -1
View File
@@ -93,7 +93,12 @@ module Api
templates = templates.where(external_id: params[:application_key]) if params[:application_key].present? templates = templates.where(external_id: params[:application_key]) if params[:application_key].present?
templates = templates.where(external_id: params[:external_id]) if params[:external_id].present? templates = templates.where(external_id: params[:external_id]) if params[:external_id].present?
templates = templates.where(slug: params[:slug]) if params[:slug].present? templates = templates.where(slug: params[:slug]) if params[:slug].present?
templates = templates.joins(:folder).where(folder: { name: params[:folder] }) if params[:folder].present?
if params[:folder].present?
folder = TemplateFolder.accessible_by(current_ability).find_by(name: params[:folder])
templates = folder ? templates.where(folder:) : templates.none
end
templates templates
end end
+4
View File
@@ -5,8 +5,12 @@ class ErrorsController < ActionController::Base
'This feature is available in Pro Edition: https://www.docuseal.com/pricing' 'This feature is available in Pro Edition: https://www.docuseal.com/pricing'
ENTERPRISE_PATHS = [ ENTERPRISE_PATHS = [
'/submissions/html',
'/api/submissions/html',
'/templates/html', '/templates/html',
'/api/templates/html', '/api/templates/html',
'/submissions/pdf',
'/api/submissions/pdf',
'/templates/pdf', '/templates/pdf',
'/api/templates/pdf', '/api/templates/pdf',
'/templates/doc', '/templates/doc',
@@ -0,0 +1,17 @@
# frozen_string_literal: true
class SearchEntriesReindexController < ApplicationController
def create
authorize!(:manage, EncryptedConfig)
ReindexAllSearchEntriesJob.perform_async
AccountConfig.find_or_initialize_by(account_id: Account.minimum(:id), key: :fulltext_search)
.update!(value: true)
Docuseal.instance_variable_set(:@fulltext_search, nil)
redirect_back(fallback_location: settings_account_path,
notice: "Started building search index. Visit #{root_url}jobs/busy to check progress.")
end
end
@@ -11,11 +11,16 @@ class SendSubmissionEmailController < ApplicationController
def create def create
if params[:template_slug] if params[:template_slug]
@submitter = Submitter.completed.joins(submission: :template).find_by!(email: params[:email].to_s.downcase, template = Template.find_by!(slug: params[:template_slug])
template: { slug: params[:template_slug] })
@submitter =
Submitter.completed.where(submission: template.submissions).find_by!(email: params[:email].to_s.downcase)
elsif params[:submission_slug] elsif params[:submission_slug]
@submitter = Submitter.completed.joins(:submission).find_by(email: params[:email].to_s.downcase, submission = Submission.find_by(slug: params[:submission_slug])
submission: { slug: params[:submission_slug] })
if submission
@submitter = Submitter.completed.find_by(submission: submission, email: params[:email].to_s.downcase)
end
return redirect_to submissions_preview_completed_path(params[:submission_slug], status: :error) unless @submitter return redirect_to submissions_preview_completed_path(params[:submission_slug], status: :error) unless @submitter
else else
@@ -24,14 +29,18 @@ class SendSubmissionEmailController < ApplicationController
RateLimit.call("send-email-#{@submitter.id}", limit: 2, ttl: 5.minutes) RateLimit.call("send-email-#{@submitter.id}", limit: 2, ttl: 5.minutes)
unless EmailEvent.exists?(tag: :submitter_documents_copy, email: @submitter.email, emailable: @submitter, SubmitterMailer.documents_copy_email(@submitter, sig: true).deliver_later! unless already_sent?(@submitter)
event_type: :send, created_at: SEND_DURATION.ago..Time.current)
SubmitterMailer.documents_copy_email(@submitter, sig: true).deliver_later!
end
respond_to do |f| respond_to do |f|
f.html { render :success } f.html { render :success }
f.json { head :ok } f.json { head :ok }
end end
end end
private
def already_sent?(submitter)
EmailEvent.exists?(tag: :submitter_documents_copy, email: submitter.email, emailable: submitter,
event_type: :send, created_at: SEND_DURATION.ago..Time.current)
end
end end
+1
View File
@@ -34,6 +34,7 @@ class SetupController < ApplicationController
{ key: EncryptedConfig::ESIGN_CERTS_KEY, value: GenerateCertificate.call.transform_values(&:to_pem) } { key: EncryptedConfig::ESIGN_CERTS_KEY, value: GenerateCertificate.call.transform_values(&:to_pem) }
] ]
@account.encrypted_configs.create!(encrypted_configs) @account.encrypted_configs.create!(encrypted_configs)
@account.account_configs.create!(key: :fulltext_search, value: true) if SearchEntry.table_exists?
Docuseal.refresh_default_url_options! Docuseal.refresh_default_url_options!
+38 -6
View File
@@ -33,12 +33,12 @@ class StartFormController < ApplicationController
@submitter = find_or_initialize_submitter(@template, submitter_params) @submitter = find_or_initialize_submitter(@template, submitter_params)
if @submitter.completed_at? if @submitter.completed_at?
redirect_to start_form_completed_path(@template.slug, email: submitter_params[:email]) redirect_to start_form_completed_path(@template.slug, submitter_params.compact_blank)
else else
if filter_undefined_submitters(@template).size > 1 && @submitter.new_record? if filter_undefined_submitters(@template).size > 1 && @submitter.new_record?
@error_message = multiple_submitters_error_message @error_message = multiple_submitters_error_message
return render :show return render :show, status: :unprocessable_entity
end end
if (is_new_record = @submitter.new_record?) if (is_new_record = @submitter.new_record?)
@@ -49,7 +49,7 @@ class StartFormController < ApplicationController
@submitter.assign_attributes(ip: request.remote_ip, ua: request.user_agent) @submitter.assign_attributes(ip: request.remote_ip, ua: request.user_agent)
end end
if @submitter.save if @submitter.errors.blank? && @submitter.save
if is_new_record if is_new_record
enqueue_submission_create_webhooks(@submitter) enqueue_submission_create_webhooks(@submitter)
@@ -63,7 +63,7 @@ class StartFormController < ApplicationController
redirect_to submit_form_path(@submitter.slug) redirect_to submit_form_path(@submitter.slug)
else else
render :show render :show, status: :unprocessable_entity
end end
end end
end end
@@ -71,9 +71,20 @@ class StartFormController < ApplicationController
def completed def completed
return redirect_to start_form_path(@template.slug) if !@template.shared_link? || @template.archived_at? return redirect_to start_form_path(@template.slug) if !@template.shared_link? || @template.archived_at?
submitter_params = params.permit(:name, :email, :phone).tap do |attrs|
attrs[:email] = Submissions.normalize_email(attrs[:email])
end
required_fields = @template.preferences.fetch('link_form_fields', ['email'])
required_params = required_fields.index_with { |key| submitter_params[key] }
raise ActionController::RoutingError, I18n.t('not_found') if required_params.any? { |_, v| v.blank? } ||
required_params.except('name').compact_blank.blank?
@submitter = Submitter.where(submission: @template.submissions) @submitter = Submitter.where(submission: @template.submissions)
.where.not(completed_at: nil) .where.not(completed_at: nil)
.find_by!(email: params[:email]) .find_by!(required_params)
end end
private private
@@ -104,6 +115,15 @@ class StartFormController < ApplicationController
end end
def find_or_initialize_submitter(template, submitter_params) def find_or_initialize_submitter(template, submitter_params)
required_fields = template.preferences.fetch('link_form_fields', ['email'])
required_params = required_fields.index_with { |key| submitter_params[key] }
find_params = required_params.except('name')
submitter = Submitter.new if find_params.compact_blank.blank?
submitter ||=
Submitter Submitter
.where(submission: template.submissions.where(expire_at: Time.current..) .where(submission: template.submissions.where(expire_at: Time.current..)
.or(template.submissions.where(expire_at: nil)).where(archived_at: nil)) .or(template.submissions.where(expire_at: nil)).where(archived_at: nil))
@@ -112,7 +132,17 @@ class StartFormController < ApplicationController
.where(external_id: nil) .where(external_id: nil)
.where(ip: [nil, request.remote_ip]) .where(ip: [nil, request.remote_ip])
.then { |rel| params[:resubmit].present? || params[:selfsign].present? ? rel.where(completed_at: nil) : rel } .then { |rel| params[:resubmit].present? || params[:selfsign].present? ? rel.where(completed_at: nil) : rel }
.find_or_initialize_by(email: submitter_params[:email], **submitter_params.compact_blank) .find_or_initialize_by(find_params)
submitter.name = required_params['name'] if submitter.new_record?
unless @resubmit_submitter
required_params.each do |key, value|
submitter.errors.add(key.to_sym, :blank) if value.blank?
end
end
submitter
end end
def assign_submission_attributes(submitter, template) def assign_submission_attributes(submitter, template)
@@ -125,6 +155,8 @@ class StartFormController < ApplicationController
metadata: @resubmit_submitter&.metadata.presence || {} metadata: @resubmit_submitter&.metadata.presence || {}
) )
submitter.assign_attributes(@resubmit_submitter.slice(:name, :email, :phone)) if @resubmit_submitter
if submitter.values.present? if submitter.values.present?
@resubmit_submitter.attachments.each do |attachment| @resubmit_submitter.attachments.each do |attachment|
submitter.attachments << attachment.dup if submitter.values.value?(attachment.uuid) submitter.attachments << attachment.dup if submitter.values.value?(attachment.uuid)
@@ -12,7 +12,7 @@ class SubmitFormDrawSignatureController < ApplicationController
return redirect_to submit_form_completed_path(@submitter.slug) if @submitter.completed_at? return redirect_to submit_form_completed_path(@submitter.slug) if @submitter.completed_at?
if @submitter.submission.template.archived_at? || @submitter.submission.archived_at? if @submitter.submission.template&.archived_at? || @submitter.submission.archived_at?
return redirect_to submit_form_path(@submitter.slug) return redirect_to submit_form_path(@submitter.slug)
end end
@@ -45,7 +45,7 @@ class SubmitFormInviteController < ApplicationController
!submitter.completed_at? && !submitter.completed_at? &&
!submitter.submission.archived_at? && !submitter.submission.archived_at? &&
!submitter.submission.expired? && !submitter.submission.expired? &&
!submitter.submission.template.archived_at? !submitter.submission.template&.archived_at?
end end
def filter_invite_submitters(submitter, key = 'invite_by_uuid') def filter_invite_submitters(submitter, key = 'invite_by_uuid')
@@ -8,7 +8,7 @@ class SubmitFormValuesController < ApplicationController
submitter = Submitter.find_by!(slug: params[:submit_form_slug]) submitter = Submitter.find_by!(slug: params[:submit_form_slug])
return render json: {} if submitter.completed_at? || submitter.declined_at? return render json: {} if submitter.completed_at? || submitter.declined_at?
return render json: {} if submitter.submission.template.archived_at? || return render json: {} if submitter.submission.template&.archived_at? ||
submitter.submission.archived_at? || submitter.submission.archived_at? ||
submitter.submission.expired? submitter.submission.expired?
@@ -22,7 +22,7 @@ class SubmittersAutocompleteController < ApplicationController
def search_submitters(submitters) def search_submitters(submitters)
if SELECT_COLUMNS.include?(params[:field]) if SELECT_COLUMNS.include?(params[:field])
if Docuseal.fulltext_search?(current_user) if Docuseal.fulltext_search?
Submitters.fulltext_search_field(current_user, submitters, params[:q], params[:field]) Submitters.fulltext_search_field(current_user, submitters, params[:q], params[:field])
else else
column = Submitter.arel_table[params[:field].to_sym] column = Submitter.arel_table[params[:field].to_sym]
@@ -6,7 +6,9 @@ class TemplateFoldersAutocompleteController < ApplicationController
LIMIT = 100 LIMIT = 100
def index def index
template_folders = @template_folders.joins(:templates).where(templates: { archived_at: nil }).distinct templates_query = Template.accessible_by(current_ability).where(archived_at: nil)
template_folders = @template_folders.where(id: templates_query.select(:folder_id))
template_folders = TemplateFolders.search(template_folders, params[:q]).limit(LIMIT) template_folders = TemplateFolders.search(template_folders, params[:q]).limit(LIMIT)
render json: template_folders.as_json(only: %i[name archived_at]) render json: template_folders.as_json(only: %i[name archived_at])
@@ -36,6 +36,8 @@ class TemplatesDashboardController < ApplicationController
end end
@pagy, @templates = pagy_auto(@templates, limit:) @pagy, @templates = pagy_auto(@templates, limit:)
load_related_submissions if params[:q].present? && @templates.blank?
end end
end end
@@ -53,10 +55,8 @@ class TemplatesDashboardController < ApplicationController
rel = Template.where( rel = Template.where(
Template.arel_table[:id].in( Template.arel_table[:id].in(
Arel::Nodes::Union.new( rel.where(folder_id: current_account.default_template_folder.id).select(:id).arel
rel.where(folder_id: current_account.default_template_folder.id).select(:id).arel, .union(shared_template_ids.arel)
shared_template_ids.arel
)
) )
) )
else else
@@ -100,4 +100,19 @@ class TemplatesDashboardController < ApplicationController
template_folders.order(id: :desc) template_folders.order(id: :desc)
end end
end end
def load_related_submissions
@related_submissions = Submission.accessible_by(current_ability)
.left_joins(:template)
.where(archived_at: nil)
.where(templates: { archived_at: nil })
.preload(:template_accesses, :created_by_user,
template: :author,
submitters: :start_form_submission_events)
@related_submissions = Submissions.search(current_user, @related_submissions, params[:q])
.order(id: :desc)
@related_submissions_pagy, @related_submissions = pagy_auto(@related_submissions, limit: 5)
end
end end
@@ -25,13 +25,13 @@ class TemplatesPreferencesController < ApplicationController
documents_copy_email_attach_documents documents_copy_email_reply_to documents_copy_email_attach_documents documents_copy_email_reply_to
completed_notification_email_attach_documents completed_notification_email_attach_documents
completed_redirect_url validate_unique_submitters completed_redirect_url validate_unique_submitters
submitters_order require_phone_2fa require_all_submitters submitters_order require_phone_2fa
default_expire_at_duration default_expire_at_duration
default_expire_at default_expire_at
completed_notification_email_subject completed_notification_email_body completed_notification_email_subject completed_notification_email_body
completed_notification_email_enabled completed_notification_email_attach_audit] + completed_notification_email_enabled completed_notification_email_attach_audit] +
[completed_message: %i[title body], [completed_message: %i[title body],
submitters: [%i[uuid request_email_subject request_email_body]]] submitters: [%i[uuid request_email_subject request_email_body]], link_form_fields: []]
).tap do |attrs| ).tap do |attrs|
attrs[:preferences].delete(:submitters) if params[:request_email_per_submitter] != '1' attrs[:preferences].delete(:submitters) if params[:request_email_per_submitter] != '1'
@@ -10,8 +10,12 @@ class TemplatesShareLinkController < ApplicationController
@template.update!(template_params) @template.update!(template_params)
if params[:redir].present?
redirect_to params[:redir]
else
head :ok head :ok
end end
end
private private
+2
View File
@@ -35,6 +35,7 @@ import SetDateButton from './elements/set_date_button'
import IndeterminateCheckbox from './elements/indeterminate_checkbox' import IndeterminateCheckbox from './elements/indeterminate_checkbox'
import AppTour from './elements/app_tour' import AppTour from './elements/app_tour'
import DashboardDropzone from './elements/dashboard_dropzone' import DashboardDropzone from './elements/dashboard_dropzone'
import RequiredCheckboxGroup from './elements/required_checkbox_group'
import * as TurboInstantClick from './lib/turbo_instant_click' import * as TurboInstantClick from './lib/turbo_instant_click'
@@ -105,6 +106,7 @@ safeRegisterElement('indeterminate-checkbox', IndeterminateCheckbox)
safeRegisterElement('app-tour', AppTour) safeRegisterElement('app-tour', AppTour)
safeRegisterElement('dashboard-dropzone', DashboardDropzone) safeRegisterElement('dashboard-dropzone', DashboardDropzone)
safeRegisterElement('check-on-click', CheckOnClick) safeRegisterElement('check-on-click', CheckOnClick)
safeRegisterElement('required-checkbox-group', RequiredCheckboxGroup)
safeRegisterElement('template-builder', class extends HTMLElement { safeRegisterElement('template-builder', class extends HTMLElement {
connectedCallback () { connectedCallback () {
+1 -1
View File
@@ -1,7 +1,7 @@
export default class extends HTMLElement { export default class extends HTMLElement {
connectedCallback () { connectedCallback () {
this.addEventListener('click', () => { this.addEventListener('click', () => {
if (!this.element.checked) { if (this.element && !this.element.disabled && !this.element.checked) {
this.element.checked = true this.element.checked = true
this.element.dispatchEvent(new Event('change', { bubbles: true })) this.element.dispatchEvent(new Event('change', { bubbles: true }))
} }
@@ -0,0 +1,17 @@
export default class extends HTMLElement {
connectedCallback () {
this.querySelectorAll('input[type="checkbox"]').forEach(checkbox => {
checkbox.addEventListener('change', this.handleChange)
})
}
handleChange = () => {
if (this.checkedCount !== 0) {
this.closest('form')?.requestSubmit()
}
}
get checkedCount () {
return this.querySelectorAll('input[type="checkbox"]:checked').length
}
}
@@ -203,7 +203,7 @@ export default {
emits: ['attached', 'update:model-value', 'start', 'minimize', 'focus'], emits: ['attached', 'update:model-value', 'start', 'minimize', 'focus'],
data () { data () {
return { return {
isInitialsStarted: !!this.previousValue, isInitialsStarted: false,
isUsePreviousValue: true, isUsePreviousValue: true,
isDrawInitials: false, isDrawInitials: false,
uploadImageInputKey: Math.random().toString() uploadImageInputKey: Math.random().toString()
@@ -218,6 +218,9 @@ export default {
} }
} }
}, },
created () {
this.isInitialsStarted = !!this.computedPreviousValue
},
async mounted () { async mounted () {
this.$nextTick(() => { this.$nextTick(() => {
if (this.$refs.canvas) { if (this.$refs.canvas) {
@@ -362,11 +365,20 @@ export default {
formData.append('file', file) formData.append('file', file)
formData.append('submitter_slug', this.submitterSlug) formData.append('submitter_slug', this.submitterSlug)
formData.append('name', 'attachments') formData.append('name', 'attachments')
formData.append('type', 'initials')
return fetch(this.baseUrl + '/api/attachments', { return fetch(this.baseUrl + '/api/attachments', {
method: 'POST', method: 'POST',
body: formData body: formData
}).then((resp) => resp.json()).then((attachment) => { }).then(async (resp) => {
if (resp.status === 422 || resp.status === 500) {
const data = await resp.json()
return Promise.reject(new Error(data.error))
}
const attachment = await resp.json()
this.$emit('attached', attachment) this.$emit('attached', attachment)
this.$emit('update:model-value', attachment.uuid) this.$emit('update:model-value', attachment.uuid)
@@ -201,7 +201,7 @@
</div> </div>
</div> </div>
<input <input
v-if="isTextSignature" v-if="isTextSignature && !modelValue && !computedPreviousValue"
id="signature_text_input" id="signature_text_input"
ref="textInput" ref="textInput"
class="base-input !text-2xl w-full mt-6" class="base-input !text-2xl w-full mt-6"
@@ -391,7 +391,7 @@ export default {
emits: ['attached', 'update:model-value', 'start', 'minimize', 'update:reason'], emits: ['attached', 'update:model-value', 'start', 'minimize', 'update:reason'],
data () { data () {
return { return {
isSignatureStarted: !!this.previousValue, isSignatureStarted: false,
isShowQr: false, isShowQr: false,
isOtherReason: false, isOtherReason: false,
isUsePreviousValue: true, isUsePreviousValue: true,
@@ -422,6 +422,8 @@ export default {
} }
}, },
created () { created () {
this.isSignatureStarted = !!this.computedPreviousValue
if (this.requireSigningReason) { if (this.requireSigningReason) {
this.field.preferences ||= {} this.field.preferences ||= {}
this.field.preferences.reason_field_uuid ||= v4() this.field.preferences.reason_field_uuid ||= v4()
@@ -716,11 +718,20 @@ export default {
formData.append('submitter_slug', this.submitterSlug) formData.append('submitter_slug', this.submitterSlug)
formData.append('name', 'attachments') formData.append('name', 'attachments')
formData.append('remember_signature', this.rememberSignature) formData.append('remember_signature', this.rememberSignature)
formData.append('type', 'signature')
return fetch(this.baseUrl + '/api/attachments', { return fetch(this.baseUrl + '/api/attachments', {
method: 'POST', method: 'POST',
body: formData body: formData
}).then((resp) => resp.json()).then((attachment) => { }).then(async (resp) => {
if (resp.status === 422 || resp.status === 500) {
const data = await resp.json()
return Promise.reject(new Error(data.error))
}
const attachment = await resp.json()
this.$emit('attached', attachment) this.$emit('attached', attachment)
this.$emit('update:model-value', attachment.uuid) this.$emit('update:model-value', attachment.uuid)
@@ -1052,6 +1052,12 @@ export default {
field.readonly = true field.readonly = true
} }
if (type === 'datenow') {
field.type = 'date'
field.readonly = true
field.default_value = '{{date}}'
}
if (type === 'date') { if (type === 'date') {
field.preferences = { field.preferences = {
format: this.defaultDateFormat format: this.defaultDateFormat
@@ -1450,6 +1456,12 @@ export default {
} }
} }
if (field.type === 'datenow') {
field.type = 'date'
field.readonly = true
field.default_value = '{{date}}'
}
if (['stamp', 'heading'].includes(field.type)) { if (['stamp', 'heading'].includes(field.type)) {
field.readonly = true field.readonly = true
} }
@@ -51,7 +51,7 @@
</template> </template>
<script> <script>
import { IconTextSize, IconWritingSign, IconCalendarEvent, IconPhoto, IconCheckbox, IconPaperclip, IconSelect, IconCircleDot, IconChecks, IconColumns3, IconPhoneCheck, IconLetterCaseUpper, IconCreditCard, IconRubberStamp, IconSquareNumber1, IconHeading, IconId } from '@tabler/icons-vue' import { IconTextSize, IconWritingSign, IconCalendarEvent, IconPhoto, IconCheckbox, IconPaperclip, IconSelect, IconCircleDot, IconChecks, IconColumns3, IconPhoneCheck, IconLetterCaseUpper, IconCreditCard, IconRubberStamp, IconSquareNumber1, IconHeading, IconId, IconCalendarCheck } from '@tabler/icons-vue'
export default { export default {
name: 'FiledTypeDropdown', name: 'FiledTypeDropdown',
@@ -101,6 +101,7 @@ export default {
signature: this.t('signature'), signature: this.t('signature'),
initials: this.t('initials'), initials: this.t('initials'),
date: this.t('date'), date: this.t('date'),
datenow: this.t('date_signed'),
number: this.t('number'), number: this.t('number'),
image: this.t('image'), image: this.t('image'),
file: this.t('file'), file: this.t('file'),
@@ -142,6 +143,7 @@ export default {
signature: IconWritingSign, signature: IconWritingSign,
initials: IconLetterCaseUpper, initials: IconLetterCaseUpper,
date: IconCalendarEvent, date: IconCalendarEvent,
datenow: IconCalendarCheck,
number: IconSquareNumber1, number: IconSquareNumber1,
image: IconPhoto, image: IconPhoto,
checkbox: IconCheckbox, checkbox: IconCheckbox,
@@ -164,7 +166,7 @@ export default {
return acc return acc
}, {}) }, {})
} else { } else {
return Object.fromEntries(Object.entries(this.fieldIcons).filter(([key]) => key !== 'heading')) return Object.fromEntries(Object.entries(this.fieldIcons).filter(([key]) => key !== 'heading' && key !== 'datenow'))
} }
} }
}, },
+1 -1
View File
@@ -347,7 +347,7 @@ export default {
return acc return acc
}, {}) }, {})
} else { } else {
return Object.fromEntries(Object.entries(this.fieldIcons).filter(([key]) => key !== 'heading')) return Object.fromEntries(Object.entries(this.fieldIcons).filter(([key]) => key !== 'heading' && key !== 'datenow'))
} }
}, },
submitterFields () { submitterFields () {
+6
View File
@@ -1,6 +1,7 @@
const en = { const en = {
font: 'Font', font: 'Font',
party: 'Party', party: 'Party',
date_signed: 'Date Signed',
method: 'Method', method: 'Method',
reorder_fields: 'Reorder fields', reorder_fields: 'Reorder fields',
verify_id: 'Verify ID', verify_id: 'Verify ID',
@@ -167,6 +168,7 @@ const en = {
} }
const es = { const es = {
date_signed: 'Fecha actual',
fuente: 'Fuente', fuente: 'Fuente',
party: 'Parte', party: 'Parte',
method: 'Método', method: 'Método',
@@ -335,6 +337,7 @@ const es = {
} }
const it = { const it = {
date_signed: 'Data attuale',
font: 'Carattere', font: 'Carattere',
party: 'Parte', party: 'Parte',
method: 'Metodo', method: 'Metodo',
@@ -503,6 +506,7 @@ const it = {
} }
const pt = { const pt = {
date_signed: 'Data atual',
fonte: 'Fonte', fonte: 'Fonte',
party: 'Parte', party: 'Parte',
method: 'Método', method: 'Método',
@@ -671,6 +675,7 @@ const pt = {
} }
const fr = { const fr = {
date_signed: 'Date actuelle',
font: 'Police', font: 'Police',
party: 'Partie', party: 'Partie',
method: 'Méthode', method: 'Méthode',
@@ -839,6 +844,7 @@ const fr = {
} }
const de = { const de = {
date_now: 'Akt. Datum',
font: 'Schriftart', font: 'Schriftart',
party: 'Partei', party: 'Partei',
method: 'Verfahren', method: 'Verfahren',
@@ -406,7 +406,7 @@ export default {
this.mappings.every((m) => m.column_index !== index) this.mappings.every((m) => m.column_index !== index)
}) })
if (columnIndex !== -1) { if (columnIndex !== -1 && this.rows.some((row) => row[columnIndex])) {
this.mappings.push({ uuid: v4(), field_name: field.name, column_index: columnIndex, submitter_uuid: submitter.uuid }) this.mappings.push({ uuid: v4(), field_name: field.name, column_index: columnIndex, submitter_uuid: submitter.uuid })
} }
}) })
@@ -0,0 +1,9 @@
# frozen_string_literal: true
class ReindexAllSearchEntriesJob
include Sidekiq::Job
def perform
SearchEntries.reindex_all
end
end
+1
View File
@@ -20,6 +20,7 @@
# #
# index_email_events_on_account_id_and_event_datetime (account_id,event_datetime) # index_email_events_on_account_id_and_event_datetime (account_id,event_datetime)
# index_email_events_on_email (email) # index_email_events_on_email (email)
# index_email_events_on_email_event_types (email) WHERE ((event_type)::text = ANY ((ARRAY['bounce'::character varying, 'soft_bounce'::character varying, 'complaint'::character varying, 'soft_complaint'::character varying])::text[]))
# index_email_events_on_emailable (emailable_type,emailable_id) # index_email_events_on_emailable (emailable_type,emailable_id)
# index_email_events_on_message_id (message_id) # index_email_events_on_message_id (message_id)
# #
+3 -1
View File
@@ -24,6 +24,8 @@
# Indexes # Indexes
# #
# index_submissions_on_account_id_and_id (account_id,id) # index_submissions_on_account_id_and_id (account_id,id)
# index_submissions_on_account_id_and_template_id_and_id (account_id,template_id,id) WHERE (archived_at IS NULL)
# index_submissions_on_account_id_and_template_id_and_id_archived (account_id,template_id,id) WHERE (archived_at IS NOT NULL)
# index_submissions_on_created_by_user_id (created_by_user_id) # index_submissions_on_created_by_user_id (created_by_user_id)
# index_submissions_on_slug (slug) UNIQUE # index_submissions_on_slug (slug) UNIQUE
# index_submissions_on_template_id (template_id) # index_submissions_on_template_id (template_id)
@@ -38,7 +40,7 @@ class Submission < ApplicationRecord
belongs_to :account belongs_to :account
belongs_to :created_by_user, class_name: 'User', optional: true belongs_to :created_by_user, class_name: 'User', optional: true
has_one :search_entry, as: :record, inverse_of: :record, dependent: :destroy has_one :search_entry, as: :record, inverse_of: :record, dependent: :destroy if SearchEntry.table_exists?
has_many :submitters, dependent: :destroy has_many :submitters, dependent: :destroy
has_many :submission_events, dependent: :destroy has_many :submission_events, dependent: :destroy
+1 -1
View File
@@ -43,7 +43,7 @@ class Submitter < ApplicationRecord
belongs_to :submission belongs_to :submission
belongs_to :account belongs_to :account
has_one :template, through: :submission has_one :template, through: :submission
has_one :search_entry, as: :record, inverse_of: :record, dependent: :destroy has_one :search_entry, as: :record, inverse_of: :record, dependent: :destroy if SearchEntry.table_exists?
attribute :values, :string, default: -> { {} } attribute :values, :string, default: -> { {} }
attribute :preferences, :string, default: -> { {} } attribute :preferences, :string, default: -> { {} }
+3 -1
View File
@@ -24,6 +24,8 @@
# Indexes # Indexes
# #
# index_templates_on_account_id (account_id) # index_templates_on_account_id (account_id)
# index_templates_on_account_id_and_folder_id_and_id (account_id,folder_id,id) WHERE (archived_at IS NULL)
# index_templates_on_account_id_and_id_archived (account_id,id) WHERE (archived_at IS NOT NULL)
# index_templates_on_author_id (author_id) # index_templates_on_author_id (author_id)
# index_templates_on_external_id (external_id) # index_templates_on_external_id (external_id)
# index_templates_on_folder_id (folder_id) # index_templates_on_folder_id (folder_id)
@@ -42,7 +44,7 @@ class Template < ApplicationRecord
belongs_to :account belongs_to :account
belongs_to :folder, class_name: 'TemplateFolder' belongs_to :folder, class_name: 'TemplateFolder'
has_one :search_entry, as: :record, inverse_of: :record, dependent: :destroy has_one :search_entry, as: :record, inverse_of: :record, dependent: :destroy if SearchEntry.table_exists?
before_validation :maybe_set_default_folder, on: :create before_validation :maybe_set_default_folder, on: :create
Whitespace-only changes.
+13 -1
View File
@@ -14,7 +14,10 @@
<div class="form-control"> <div class="form-control">
<%= ff.label :timezone, t('time_zone'), class: 'label' %> <%= ff.label :timezone, t('time_zone'), class: 'label' %>
<%= ff.select :timezone, nil, {}, class: 'base-select' do %> <%= ff.select :timezone, nil, {}, class: 'base-select' do %>
<%= time_zone_options_for_select(current_account.timezone) %> <% tzinfo = TZInfo::Timezone.get(ActiveSupport::TimeZone::MAPPING[current_account.timezone] || current_account.timezone) %>
<% items = ActiveSupport::TimeZone.all.map { |z| [z.to_s, z.name] } %>
<% items.unshift([tzinfo.to_s, current_account.timezone]) unless ActiveSupport::TimeZone.all.find { |e| e.tzinfo == tzinfo } %>
<%= options_for_select(items, current_account.timezone) %>
<% end %> <% end %>
</div> </div>
<div class="form-control"> <div class="form-control">
@@ -165,6 +168,15 @@
<% end %> <% end %>
<% end %> <% end %>
<% end %> <% end %>
<%= render 'extra_preferences' %>
<% if !Docuseal.multitenant? && SearchEntry.table_exists? && (!Docuseal.fulltext_search? || params[:reindex] == 'true') && can?(:manage, EncryptedConfig) %>
<div class="flex items-center justify-between py-2.5">
<span>
Efficient search with search index
</span>
<%= button_to params[:reindex] == 'true' ? 'Reindex' : 'Build Search Index', settings_search_entries_reindex_index_path, method: :post, class: 'btn btn-sm btn-neutral text-white px-4' %>
</div>
<% end %>
</div> </div>
<% end %> <% end %>
<%= render 'compliances' %> <%= render 'compliances' %>
@@ -20,7 +20,7 @@
</a> </a>
</div> </div>
</div> </div>
<div id="us_server_selector" class="flex justify-center hidden"> <div id="server_selector" class="flex justify-center <%= 'hidden' unless eu_server %>">
<div class="dropdown"> <div class="dropdown">
<label tabindex="0" class="relative btn btn-sm bg-transparent font-medium normal-case border-base-content/20 justify-start" style="width: 141px; padding: 0 20px"> <label tabindex="0" class="relative btn btn-sm bg-transparent font-medium normal-case border-base-content/20 justify-start" style="width: 141px; padding: 0 20px">
<% if eu_server %> <% if eu_server %>
+6 -2
View File
@@ -2,14 +2,18 @@
if (!window.customElements.get('server-selector')) { if (!window.customElements.get('server-selector')) {
customElements.define('server-selector', class extends HTMLElement { customElements.define('server-selector', class extends HTMLElement {
connectedCallback() { connectedCallback() {
const usServerSelector = this.querySelector('#us_server_selector'); const serverSelector = this.querySelector('#server_selector');
const globalServerSelector = this.querySelector('#global_server_selector'); const globalServerSelector = this.querySelector('#global_server_selector');
const euServerAlert = this.querySelector('#eu_server_alert'); const euServerAlert = this.querySelector('#eu_server_alert');
const timezone = Intl.DateTimeFormat().resolvedOptions().timeZone; const timezone = Intl.DateTimeFormat().resolvedOptions().timeZone;
const usTimezones = /^(?:America\/(?:New_York|Detroit|Kentucky|Indiana|Chicago|Menominee|North_Dakota|Denver|Boise|Phoenix|Los_Angeles|Anchorage|Juneau|Sitka|Metlakatla|Yakutat|Nome|Adak)|Pacific\/Honolulu)/; const usTimezones = /^(?:America\/(?:New_York|Detroit|Kentucky|Indiana|Chicago|Menominee|North_Dakota|Denver|Boise|Phoenix|Los_Angeles|Anchorage|Juneau|Sitka|Metlakatla|Yakutat|Nome|Adak)|Pacific\/Honolulu)/;
if (!serverSelector.classList.contains('hidden')) {
return
}
if (usTimezones.test(timezone)) { if (usTimezones.test(timezone)) {
usServerSelector.classList.remove('hidden'); serverSelector.classList.remove('hidden');
} else if (timezone.includes('Europe')) { } else if (timezone.includes('Europe')) {
globalServerSelector.classList.remove('hidden'); globalServerSelector.classList.remove('hidden');
euServerAlert?.classList?.remove('hidden'); euServerAlert?.classList?.remove('hidden');
+12 -10
View File
@@ -1,27 +1,29 @@
<% link = pagy_anchor(@pagy) %> <% link = pagy_anchor(pagy) %>
<% if @pagy.pages > 1 %> <% if pagy.pages > 1 %>
<div class="flex my-6 justify-center md:justify-between"> <div class="flex my-6 justify-center md:justify-between">
<div class="hidden md:block text-sm"> <div class="hidden md:block text-sm">
<% if @pagy.count.nil? %> <% if pagy.count.nil? %>
<%= t("pagination.#{local_assigns.fetch(:items_name, 'items')}.range_without_total", from: local_assigns.fetch(:from, @pagy.from), to: local_assigns.fetch(:to, @pagy.to)) %> <%= t("pagination.#{local_assigns.fetch(:items_name, 'items')}.range_without_total", from: local_assigns.fetch(:from, pagy.from), to: local_assigns.fetch(:to, pagy.to)) %>
<% else %> <% else %>
<%= t("pagination.#{local_assigns.fetch(:items_name, 'items')}.range_with_total", from: local_assigns.fetch(:from, @pagy.from), to: local_assigns.fetch(:to, @pagy.to), count: local_assigns.fetch(:count, @pagy.count)) %> <%= t("pagination.#{local_assigns.fetch(:items_name, 'items')}.range_with_total", from: local_assigns.fetch(:from, pagy.from), to: local_assigns.fetch(:to, pagy.to), count: local_assigns.fetch(:count, pagy.count)) %>
<% end %> <% end %>
<%= local_assigns[:left_additional_html] %> <%= local_assigns[:left_additional_html] %>
</div> </div>
<div class="flex items-center space-x-1.5"> <div class="flex items-center space-x-1.5">
<%= local_assigns[:right_additional_html] %> <%= local_assigns[:right_additional_html] %>
<div class="join"> <div class="join">
<% if @pagy.prev %> <% if pagy.prev %>
<%== link.call(@pagy.prev, '«', classes: 'join-item btn min-h-full h-10') %> <%== link.call(pagy.prev, '«', classes: 'join-item btn min-h-full h-10') %>
<% else %> <% else %>
<span class="join-item btn btn-disabled !bg-base-200 min-h-full h-10">«</span> <span class="join-item btn btn-disabled !bg-base-200 min-h-full h-10">«</span>
<% end %> <% end %>
<span class="join-item btn font-medium uppercase min-h-full h-10"> <span class="join-item btn font-medium uppercase min-h-full h-10">
<%= t('page_number', number: @pagy.page) %> <%= t('page_number', number: pagy.page) %>
</span> </span>
<% if @pagy.next %> <% if local_assigns[:next_page_path].present? %>
<%== link.call(@pagy.next, '»', classes: 'join-item btn min-h-full h-10') %> <%= link_to '»', local_assigns[:next_page_path], class: 'join-item btn min-h-full h-10' %>
<% elsif pagy.next %>
<%== link.call(pagy.next, '»', classes: 'join-item btn min-h-full h-10') %>
<% else %> <% else %>
<span class="join-item btn btn-disabled !bg-base-200 min-h-full h-10">»</span> <span class="join-item btn btn-disabled !bg-base-200 min-h-full h-10">»</span>
<% end %> <% end %>
+1 -1
View File
@@ -28,7 +28,7 @@
<% end %> <% end %>
<% if Templates.filter_undefined_submitters(@template.submitters).size == 1 && %w[api embed].exclude?(@submitter.submission.source) && @submitter.account.account_configs.find_or_initialize_by(key: AccountConfig::ALLOW_TO_RESUBMIT).value != false && @template.shared_link? %> <% if Templates.filter_undefined_submitters(@template.submitters).size == 1 && %w[api embed].exclude?(@submitter.submission.source) && @submitter.account.account_configs.find_or_initialize_by(key: AccountConfig::ALLOW_TO_RESUBMIT).value != false && @template.shared_link? %>
<toggle-submit class="block"> <toggle-submit class="block">
<%= button_to button_title(title: t('resubmit'), disabled_with: t('resubmit'), icon: svg_icon('reload', class: 'w-6 h-6')), start_form_path(@template.slug), params: { submitter: { email: params[:email] }, resubmit: true }, method: :put, class: 'white-button w-full' %> <%= button_to button_title(title: t('resubmit'), disabled_with: t('resubmit'), icon: svg_icon('reload', class: 'w-6 h-6')), start_form_path(@template.slug), params: { submitter: params.permit(:name, :email, :phone).compact_blank, resubmit: true }, method: :put, class: 'white-button w-full' %>
</toggle-submit> </toggle-submit>
<% end %> <% end %>
</div> </div>
+8 -5
View File
@@ -1,8 +1,8 @@
<% content_for(:html_title, "#{@template.name} | DocuSeal") %> <% content_for(:html_title, "#{@template.name} | DocuSeal") %>
<% I18n.with_locale(@template.account.locale) do %>
<% content_for(:html_description, t('share_link_is_currently_disabled')) %> <% content_for(:html_description, t('share_link_is_currently_disabled')) %>
<div class="max-w-md mx-auto px-2 mt-12 mb-4"> <% end %>
<div class="space-y-6 mx-auto"> <div class="max-w-md space-y-6 mx-auto px-2 mt-12 mb-4">
<div class="space-y-6">
<div class="text-center w-full space-y-6"> <div class="text-center w-full space-y-6">
<%= render 'banner' %> <%= render 'banner' %>
<p class="text-xl font-semibold text-center"> <p class="text-xl font-semibold text-center">
@@ -22,7 +22,10 @@
</div> </div>
</div> </div>
</div> </div>
</div> <% if can?(:update, @template) %>
</div> <toggle-submit class="block">
<%= button_to button_title(title: t('enable_shared_link'), icon: svg_icon('lock_open', class: 'w-6 h-6')), template_share_link_path(@template), params: { template: { shared_link: true }, redir: start_form_path(slug: @template.slug) }, method: :post, class: 'white-button w-full' %>
</toggle-submit>
<% end %>
</div> </div>
<%= render 'shared/attribution', link_path: '/start', account: @template.account %> <%= render 'shared/attribution', link_path: '/start', account: @template.account %>
+26 -5
View File
@@ -1,5 +1,7 @@
<% content_for(:html_title, "#{@template.name} | DocuSeal") %> <% content_for(:html_title, "#{@template.name} | DocuSeal") %>
<% content_for(:html_description, "#{@template.account.name} has invited you to fill and sign documents online effortlessly with a secure, fast, and user-friendly digital document signing solution.") %> <% I18n.with_locale(@template.account.locale) do %>
<% content_for(:html_description, t('account_name_has_invited_you_to_fill_and_sign_documents_online_effortlessly_with_a_secure_fast_and_user_friendly_digital_document_signing_solution', account_name: @template.account.name)) %>
<% end %>
<div class="max-w-md mx-auto px-2 mt-12 mb-4"> <div class="max-w-md mx-auto px-2 mt-12 mb-4">
<div class="space-y-6 mx-auto"> <div class="space-y-6 mx-auto">
<div class="space-y-6"> <div class="space-y-6">
@@ -27,13 +29,32 @@
</div> </div>
<% if !@template.archived_at? && !@template.account.archived_at? %> <% if !@template.archived_at? && !@template.account.archived_at? %>
<%= form_for @submitter, url: start_form_path(@template.slug), data: { turbo_frame: :_top }, method: :put, html: { class: 'space-y-4' } do |f| %> <%= form_for @submitter, url: start_form_path(@template.slug), data: { turbo_frame: :_top }, method: :put, html: { class: 'space-y-4' } do |f| %>
<% if @error_message %>
<div class="alert items-start bg-base-100 border border-red-400 text-red-400">
<%= svg_icon('info_circle', class: 'stroke-current shrink-0 h-6 w-6 mt-1') %>
<div class="text-sm"><%= @error_message %></div>
</div>
<% end %>
<% link_form_fields = @template.preferences.fetch('link_form_fields', ['email']) %>
<% multiple_fields = link_form_fields.size > 1 %>
<% if link_form_fields.include?('name') %>
<div dir="auto" class="form-control !mt-0">
<%= f.label :name, t('name'), class: 'label' %>
<%= f.text_field :name, value: current_user&.full_name || params[:name] || @submitter.name, required: true, class: 'base-input', placeholder: t(multiple_fields ? 'provide_your_name' : 'provide_your_name_to_start') %>
</div>
<% end %>
<% if link_form_fields.include?('email') %>
<div dir="auto" class="form-control !mt-0"> <div dir="auto" class="form-control !mt-0">
<%= f.label :email, t('email'), class: 'label' %> <%= f.label :email, t('email'), class: 'label' %>
<%= f.email_field :email, value: current_user&.email || params[:email] || @submitter.email, required: true, class: 'base-input', placeholder: t('provide_your_email_to_start') %> <%= f.email_field :email, value: current_user&.email || params[:email] || @submitter.email, required: true, class: 'base-input', placeholder: t(multiple_fields ? 'provide_your_email' : 'provide_your_email_to_start') %>
<% if @error_message %>
<span class="label-text-alt text-red-400 mt-1"><%= @error_message %></span>
<% end %>
</div> </div>
<% end %>
<% if link_form_fields.include?('phone') %>
<div dir="auto" class="form-control !mt-0">
<%= f.label :phone, t('phone'), class: 'label' %>
<%= f.telephone_field :phone, value: params[:phone] || @submitter.phone, pattern: '^\+[0-9\s\-]+$', oninvalid: "this.value ? this.setCustomValidity('#{t('use_international_format_1xxx_')}') : ''", oninput: "this.setCustomValidity('')", required: true, class: 'base-input', placeholder: t(multiple_fields ? 'provide_your_phone_in_international_format' : 'provide_your_phone_in_international_format_to_start') %>
</div>
<% end %>
<toggle-submit dir="auto" class="form-control"> <toggle-submit dir="auto" class="form-control">
<%= f.button button_title(title: t('start'), disabled_with: t('starting')), class: 'base-button' %> <%= f.button button_title(title: t('start'), disabled_with: t('starting')), class: 'base-button' %>
</toggle-submit> </toggle-submit>
@@ -20,7 +20,7 @@
<input type="hidden" name="submission[1][submitters][][uuid]" value="<%= item['uuid'] %>"> <input type="hidden" name="submission[1][submitters][][uuid]" value="<%= item['uuid'] %>">
<submitters-autocomplete data-field="name"> <submitters-autocomplete data-field="name">
<linked-input data-target-id="<%= "detailed_name_#{item['linked_to_uuid']}" if item['linked_to_uuid'].present? %>"> <linked-input data-target-id="<%= "detailed_name_#{item['linked_to_uuid']}" if item['linked_to_uuid'].present? %>">
<%= tag.input type: 'text', name: 'submission[1][submitters][][name]', autocomplete: 'off', class: 'base-input !h-10 w-full', placeholder: t('name'), required: index.zero?, value: item['email'].present? ? current_account.submitters.accessible_by(current_ability).where.not(name: nil).order(id: :desc).find_by(email: item['email'])&.name : ((params[:selfsign] && index.zero?) || item['is_requester'] ? current_user.full_name : ''), dir: 'auto', id: "detailed_name_#{item['uuid']}" %> <%= tag.input type: 'text', name: 'submission[1][submitters][][name]', autocomplete: 'off', class: 'base-input !h-10 w-full', placeholder: t('name'), required: index.zero? || template.preferences['require_all_submitters'], value: item['email'].present? ? current_account.submitters.accessible_by(current_ability).where.not(name: nil).order(id: :desc).find_by(email: item['email'])&.name : ((params[:selfsign] && index.zero?) || item['is_requester'] ? current_user.full_name : ''), dir: 'auto', id: "detailed_name_#{item['uuid']}" %>
</linked-input> </linked-input>
</submitters-autocomplete> </submitters-autocomplete>
<div class="grid <%= 'md:grid-cols-2 gap-1' if submitters.size == 1 %>"> <div class="grid <%= 'md:grid-cols-2 gap-1' if submitters.size == 1 %>">
+1 -1
View File
@@ -29,7 +29,7 @@
<input type="hidden" name="submission[1][submitters][][uuid]" value="<%= item['uuid'] %>"> <input type="hidden" name="submission[1][submitters][][uuid]" value="<%= item['uuid'] %>">
<submitters-autocomplete data-field="email"> <submitters-autocomplete data-field="email">
<linked-input data-target-id="<%= "email_#{item['linked_to_uuid']}" if item['linked_to_uuid'].present? %>"> <linked-input data-target-id="<%= "email_#{item['linked_to_uuid']}" if item['linked_to_uuid'].present? %>">
<%= tag.input type: 'email', multiple: true, name: 'submission[1][submitters][][email]', autocomplete: 'off', class: 'base-input !h-10 w-full', placeholder: t('email'), required: index.zero?, value: item['email'].presence || ((params[:selfsign] && index.zero?) || item['is_requester'] ? current_user.email : ''), id: "email_#{item['uuid']}" %> <%= tag.input type: 'email', multiple: true, name: 'submission[1][submitters][][email]', autocomplete: 'off', class: 'base-input !h-10 w-full', placeholder: t('email'), required: index.zero? || template.preferences['require_all_submitters'], value: item['email'].presence || ((params[:selfsign] && index.zero?) || item['is_requester'] ? current_user.email : ''), id: "email_#{item['uuid']}" %>
</linked-input> </linked-input>
</submitters-autocomplete> </submitters-autocomplete>
</submitter-item> </submitter-item>
+1 -1
View File
@@ -21,7 +21,7 @@
<input type="hidden" name="submission[1][submitters][][uuid]" value="<%= item['uuid'] %>"> <input type="hidden" name="submission[1][submitters][][uuid]" value="<%= item['uuid'] %>">
<submitters-autocomplete data-field="phone"> <submitters-autocomplete data-field="phone">
<linked-input data-target-id="<%= "phone_phone_#{item['linked_to_uuid']}" if item['linked_to_uuid'].present? %>"> <linked-input data-target-id="<%= "phone_phone_#{item['linked_to_uuid']}" if item['linked_to_uuid'].present? %>">
<%= tag.input type: 'tel', pattern: '^\+[0-9\s\-]+$', oninvalid: "this.value ? this.setCustomValidity('#{t('use_international_format_1xxx_')}') : ''", oninput: "this.setCustomValidity('')", name: 'submission[1][submitters][][phone]', autocomplete: 'off', class: 'base-input !h-10 w-full', placeholder: t('phone'), required: index.zero?, id: "phone_phone_#{item['uuid']}" %> <%= tag.input type: 'tel', pattern: '^\+[0-9\s\-]+$', oninvalid: "this.value ? this.setCustomValidity('#{t('use_international_format_1xxx_')}') : ''", oninput: "this.setCustomValidity('')", name: 'submission[1][submitters][][phone]', autocomplete: 'off', class: 'base-input !h-10 w-full', placeholder: t('phone'), required: index.zero? || template.preferences['require_all_submitters'], id: "phone_phone_#{item['uuid']}" %>
</linked-input> </linked-input>
</submitters-autocomplete> </submitters-autocomplete>
<% if submitters.size > 1 %> <% if submitters.size > 1 %>
+2 -2
View File
@@ -28,9 +28,9 @@
</div> </div>
<% end %> <% end %>
</div> </div>
<% elsif field['type'].in?(['image', 'initials', 'stamp']) %> <% elsif field['type'].in?(['image', 'initials', 'stamp']) && attachments_index[value].image? %>
<img class="object-contain mx-auto" src="<%= attachments_index[value].url %>" loading="lazy"> <img class="object-contain mx-auto" src="<%= attachments_index[value].url %>" loading="lazy">
<% elsif field['type'].in?(['file', 'payment']) %> <% elsif field['type'].in?(['file', 'payment', 'image']) %>
<autosize-field></autosize-field> <autosize-field></autosize-field>
<div class="px-0.5 flex flex-col justify-center"> <div class="px-0.5 flex flex-col justify-center">
<% Array.wrap(value).each do |val| %> <% Array.wrap(value).each do |val| %>
+5 -3
View File
@@ -74,6 +74,7 @@
<% schema = Submissions.filtered_conditions_schema(@submission, values:) %> <% schema = Submissions.filtered_conditions_schema(@submission, values:) %>
<% schema.each do |item| %> <% schema.each do |item| %>
<% document = @submission.schema_documents.find { |a| item['attachment_uuid'] == a.uuid } %> <% document = @submission.schema_documents.find { |a| item['attachment_uuid'] == a.uuid } %>
<% if document.preview_images.first %>
<a href="#<%= "page-#{document.uuid}-0" %>" onclick="[event.preventDefault(), window[event.target.closest('a').href.split('#')[1]].scrollIntoView({ behavior: 'smooth', block: 'start' })]" class="block cursor-pointer"> <a href="#<%= "page-#{document.uuid}-0" %>" onclick="[event.preventDefault(), window[event.target.closest('a').href.split('#')[1]].scrollIntoView({ behavior: 'smooth', block: 'start' })]" class="block cursor-pointer">
<img src="<%= Docuseal::URL_CACHE.fetch([document.id, document.uuid, 0].join(':'), expires_in: 10.minutes) { document.preview_images.first.url } %>" width="<%= document.preview_images.first.metadata['width'] %>" height="<%= document.preview_images.first.metadata['height'] %>" class="rounded border" loading="lazy"> <img src="<%= Docuseal::URL_CACHE.fetch([document.id, document.uuid, 0].join(':'), expires_in: 10.minutes) { document.preview_images.first.url } %>" width="<%= document.preview_images.first.metadata['width'] %>" height="<%= document.preview_images.first.metadata['height'] %>" class="rounded border" loading="lazy">
<div class="pb-2 pt-1.5 text-center" dir="auto"> <div class="pb-2 pt-1.5 text-center" dir="auto">
@@ -81,6 +82,7 @@
</div> </div>
</a> </a>
<% end %> <% end %>
<% end %>
</div> </div>
<div id="document_view" class="w-full overflow-y-auto overflow-x-hidden mt-0.5 pt-0.5"> <div id="document_view" class="w-full overflow-y-auto overflow-x-hidden mt-0.5 pt-0.5">
<div class="pr-3.5 pl-0.5"> <div class="pr-3.5 pl-0.5">
@@ -92,7 +94,7 @@
<% document = @submission.schema_documents.find { |e| e.uuid == item['attachment_uuid'] } %> <% document = @submission.schema_documents.find { |e| e.uuid == item['attachment_uuid'] } %>
<% document_annots_index = document.metadata.dig('pdf', 'annotations')&.group_by { |e| e['page'] } || {} %> <% document_annots_index = document.metadata.dig('pdf', 'annotations')&.group_by { |e| e['page'] } || {} %>
<% preview_images_index = document.preview_images.loaded? ? document.preview_images.index_by { |e| e.filename.base.to_i } : {} %> <% preview_images_index = document.preview_images.loaded? ? document.preview_images.index_by { |e| e.filename.base.to_i } : {} %>
<% lazyload_metadata = document.preview_images.first.metadata %> <% lazyload_metadata = document.preview_images.first&.metadata || {} %>
<% (document.metadata.dig('pdf', 'number_of_pages') || (document.preview_images.loaded? ? preview_images_index.size : document.preview_images.size)).times do |index| %> <% (document.metadata.dig('pdf', 'number_of_pages') || (document.preview_images.loaded? ? preview_images_index.size : document.preview_images.size)).times do |index| %>
<% page = preview_images_index[index] || page_blob_struct.new(metadata: lazyload_metadata, url: preview_document_page_path(document.signed_uuid, "#{index}.jpg")) %> <% page = preview_images_index[index] || page_blob_struct.new(metadata: lazyload_metadata, url: preview_document_page_path(document.signed_uuid, "#{index}.jpg")) %>
<div id="<%= "page-#{document.uuid}-#{index}" %>" class="relative"> <div id="<%= "page-#{document.uuid}-#{index}" %>" class="relative">
@@ -242,9 +244,9 @@
<div class="w-full bg-base-300 py-1"> <div class="w-full bg-base-300 py-1">
<img class="object-contain mx-auto" style="max-height: <%= field['type'] == 'signature' ? 100 : 50 %>px" height="<%= attachments_index[value].metadata['height'] %>" width="<%= attachments_index[value].metadata['width'] %>" src="<%= attachments_index[value].url %>" loading="lazy"> <img class="object-contain mx-auto" style="max-height: <%= field['type'] == 'signature' ? 100 : 50 %>px" height="<%= attachments_index[value].metadata['height'] %>" width="<%= attachments_index[value].metadata['width'] %>" src="<%= attachments_index[value].url %>" loading="lazy">
</div> </div>
<% elsif field['type'].in?(['image', 'stamp']) %> <% elsif field['type'].in?(['image', 'stamp']) && attachments_index[value].image? %>
<img class="object-contain mx-auto max-h-28" style="max-height: 200px" height="<%= attachments_index[value].metadata['height'] %>" width="<%= attachments_index[value].metadata['width'] %>" src="<%= attachments_index[value].url %>" loading="lazy"> <img class="object-contain mx-auto max-h-28" style="max-height: 200px" height="<%= attachments_index[value].metadata['height'] %>" width="<%= attachments_index[value].metadata['width'] %>" src="<%= attachments_index[value].url %>" loading="lazy">
<% elsif field['type'] == 'file' || field['type'] == 'payment' %> <% elsif field['type'].in?(['file', 'payment', 'image']) %>
<div class="flex flex-col justify-center"> <div class="flex flex-col justify-center">
<% Array.wrap(value).each do |val| %> <% Array.wrap(value).each do |val| %>
<a target="_blank" class="flex items-center space-x-1" href="<%= attachments_index[val].url %>"> <a target="_blank" class="flex items-center space-x-1" href="<%= attachments_index[val].url %>">
+3 -1
View File
@@ -1,5 +1,7 @@
<% content_for(:html_title, "#{@submitter.submission.name || @submitter.submission.template.name} | DocuSeal") %> <% content_for(:html_title, "#{@submitter.submission.name || @submitter.submission.template.name} | DocuSeal") %>
<% content_for(:html_description, "#{@submitter.account.name} has invited you to fill and sign documents online effortlessly with a secure, fast, and user-friendly digital document signing solution.") %> <% I18n.with_locale(@submitter.account.locale) do %>
<% content_for(:html_description, t('account_name_has_invited_you_to_fill_and_sign_documents_online_effortlessly_with_a_secure_fast_and_user_friendly_digital_document_signing_solution', account_name: @submitter.account.name)) %>
<% end %>
<% fields_index = Templates.build_field_areas_index(@submitter.submission.template_fields || @submitter.submission.template.fields) %> <% fields_index = Templates.build_field_areas_index(@submitter.submission.template_fields || @submitter.submission.template.fields) %>
<% values = @submitter.submission.submitters.reduce({}) { |acc, sub| acc.merge(sub.values) } %> <% values = @submitter.submission.submitters.reduce({}) { |acc, sub| acc.merge(sub.values) } %>
<% submitters_index = @submitter.submission.submitters.index_by(&:uuid) %> <% submitters_index = @submitter.submission.submitters.index_by(&:uuid) %>
+10 -1
View File
@@ -56,7 +56,7 @@
<% if @templates.present? %> <% if @templates.present? %>
<div class="grid gap-4 md:grid-cols-3"> <div class="grid gap-4 md:grid-cols-3">
<%= render partial: 'templates/template', collection: @templates %> <%= render partial: 'templates/template', collection: @templates %>
<% if show_dropzone && (current_user.created_at > 2.weeks.ago || params[:tour] == 'true') && current_user == true_user %> <% if (show_dropzone && current_user.created_at > 2.weeks.ago && current_user == true_user) || params[:tour] == 'true' %>
<% user_config = current_user.user_configs.find_or_initialize_by(key: UserConfig::SHOW_APP_TOUR) %> <% user_config = current_user.user_configs.find_or_initialize_by(key: UserConfig::SHOW_APP_TOUR) %>
<% if user_config.new_record? || user_config.value || params[:tour] == 'true' %> <% if user_config.new_record? || user_config.value || params[:tour] == 'true' %>
<div class="hidden md:block"> <div class="hidden md:block">
@@ -98,5 +98,14 @@
<%= t('templates_not_found') %> <%= t('templates_not_found') %>
</div> </div>
</div> </div>
<% if @related_submissions.present? %>
<h1 class="text-2xl md:text-3xl sm:text-4xl font-bold mt-8 md:mt-4">
<%= t('submissions') %>
</h1>
<div class="space-y-4 mt-4">
<%= render partial: 'templates/submission', collection: @related_submissions, locals: { with_template: true } %>
</div>
<%= render 'shared/pagination', pagy: @related_submissions_pagy, items_name: 'submissions', next_page_path: submissions_path(q: params[:q]) %>
<% end %>
<% end %> <% end %>
<%= render 'shared/review_form' %> <%= render 'shared/review_form' %>
@@ -0,0 +1,87 @@
<% close_on_submit = local_assigns.fetch(:close_on_submit, true) %>
<%= form_for template, url: template_recipients_path(template), method: :post, html: { autocomplete: 'off', class: 'mt-1', id: :submitters_form }, data: { close_on_submit: } do |f| %>
<% unless close_on_submit %>
<toggle-on-submit data-element-id="form_saved_alert"></toggle-on-submit>
<% end %>
<div class="space-y-3 divide-y">
<% template.submitters.each_with_index do |submitter, index| %>
<div class="<%= 'pt-3' if index.positive? %>">
<%= f.fields_for :submitters, item = Struct.new(:name, :uuid, :is_requester, :email, :invite_by_uuid, :optional_invite_by_uuid, :linked_to_uuid, :option).new(*submitter.values_at('name', 'uuid', 'is_requester', 'email', 'invite_by_uuid', 'optional_invite_by_uuid', 'linked_to_uuid')), index: do |ff| %>
<% item.option = item.is_requester.present? ? 'is_requester' : (item.email.present? ? 'email' : (item.linked_to_uuid.present? ? "linked_to_#{item.linked_to_uuid}" : (item.invite_by_uuid.present? ? "invite_by_#{item.invite_by_uuid}" : (item.optional_invite_by_uuid.present? ? "optional_invite_by_#{item.optional_invite_by_uuid}" : '')))) %>
<%= ff.hidden_field :uuid %>
<div class="form-control">
<%= ff.text_field :name, class: 'w-full outline-none border-transparent focus:border-transparent focus:ring-0 bg-base-100 px-1 peer mb-2', autocomplete: 'off', placeholder: "#{index + 1}#{(index + 1).ordinal} Party", required: true %>
<% if template.submitters.size == 2 %>
<%= tag.input name: ff.field_name(:email), value: ff.object.email, type: :email, class: 'base-input', multiple: true, autocomplete: 'off', placeholder: t('default_email'), disabled: ff.object.is_requester || ff.object.invite_by_uuid.present? || ff.object.optional_invite_by_uuid.present?, id: field_uuid = SecureRandom.uuid %>
<% else %>
<toggle-attribute data-target-id="<%= email_field_uuid = SecureRandom.uuid %>" data-class-name="hidden" data-value="email">
<%= ff.select :option, [[t('not_specified'), 'not_set'], (local_assigns[:with_submission_requester] != false ? [t('submission_requester'), 'is_requester'] : nil), [t('specified_email'), 'email'], *(template.submitters - [submitter]).flat_map { |e| [[t('invite_by_name', name: e['name']), "invite_by_#{e['uuid']}"], [t('invite_by_name', name: e['name']) + " (#{t(:optional).capitalize})", "optional_invite_by_#{e['uuid']}"]] }, *(template.submitters - [submitter]).map { |e| [t('same_as_name', name: e['name']), "linked_to_#{e['uuid']}"] }].compact, {}, class: 'base-select mb-3' %>
</toggle-attribute>
<%= tag.input name: ff.field_name(:email), type: :email, value: ff.object.email, multiple: true, class: "base-input #{'hidden' if item.option != 'email'}", autocomplete: 'off', placeholder: t('default_email'), id: email_field_uuid %>
<% end %>
</div>
<% if template.submitters.size == 2 %>
<checkbox-group class="mt-3 flex items-center space-x-4">
<% if local_assigns[:with_submission_requester] != false %>
<label class="flex items-center space-x-2 cursor-pointer">
<toggle-attribute data-target-id="<%= field_uuid %>" class="flex" data-attribute="disabled">
<%= ff.check_box :is_requester, class: 'base-checkbox' %>
</toggle-attribute>
<span class="select-none">
<%= t('submission_requester') %>
</span>
</label>
<% end %>
<% if index == 1 %>
<label class="flex items-center space-x-2 cursor-pointer">
<toggle-attribute data-target-id="<%= field_uuid %>" class="flex" data-attribute="disabled">
<indeterminate-checkbox data-indeterminate="<%= ff.object.optional_invite_by_uuid.present? %>" data-show-indeterminate-id="invite_optional" data-name="<%= ff.field_name(:invite_by_uuid) %>" data-indeterminate-name="<%= ff.field_name(:optional_invite_by_uuid) %>" class="flex">
<%= ff.check_box ff.object.optional_invite_by_uuid.present? ? :optional_invite_by_uuid : :invite_by_uuid, { class: 'base-checkbox' }, template.submitters.first['uuid'], '' %>
</indeterminate-checkbox>
</toggle-attribute>
<span class="select-none">
<%= t('invite_by_name', name: template.submitters.first['name']) %> <span id="invite_optional" class="<%= 'hidden' if ff.object.optional_invite_by_uuid.blank? %>">(<%= t(:optional).capitalize %>)</span>
</span>
</label>
<% end %>
</checkbox-group>
<% end %>
<% end %>
</div>
<% end %>
</div>
<% end %>
<% if local_assigns[:with_toggles] != false %>
<% unless current_account.account_configs.exists?(key: AccountConfig::ENFORCE_SIGNING_ORDER_KEY, value: true) %>
<%= form_for template, url: template_preferences_path(template), method: :post, html: { autocomplete: 'off', class: 'mt-2' }, data: { close_on_submit: false } do |f| %>
<div class="flex items-center pt-4 mt-4 justify-between border-t w-full">
<span>
<%= t('enforce_recipients_order') %>
</span>
<%= f.fields_for :preferences, Struct.new(:submitters_order).new(template.preferences['submitters_order']) do |ff| %>
<%= ff.check_box :submitters_order, { class: 'toggle', onchange: 'this.form.requestSubmit()' }, 'preserved', '' %>
<% end %>
</div>
<% end %>
<% end %>
<% if can?(:manage, :personalization_advanced) %>
<%= form_for template, url: template_preferences_path(template), method: :post, html: { autocomplete: 'off', class: 'mt-2' }, data: { close_on_submit: false } do |f| %>
<div class="flex items-center mt-4 justify-between w-full">
<span>
<%= t('ensure_unique_recipients') %>
</span>
<%= f.fields_for :preferences, Struct.new(:validate_unique_submitters).new(template.preferences['validate_unique_submitters']) do |ff| %>
<%= ff.check_box :validate_unique_submitters, { class: 'toggle', onchange: 'this.form.requestSubmit()' }, 'true', '' %>
<% end %>
</div>
<% end %>
<% end %>
<% end %>
<div class="form-control mt-5">
<%= button_tag button_title(title: t('save'), disabled_with: t('updating')), class: 'base-button', form: :submitters_form %>
<% unless close_on_submit %>
<div class="flex justify-center">
<span id="form_saved_alert" class="text-sm invisible font-normal mt-0.5"><%= t('changes_have_been_saved') %></span>
</div>
<% end %>
</div>
+2 -75
View File
@@ -287,81 +287,8 @@
<%= render 'templates_code_modal/preferences', class: 'pt-2' %> <%= render 'templates_code_modal/preferences', class: 'pt-2' %>
</div> </div>
<% if show_recipients %> <% if show_recipients %>
<div id="recipients" class="hidden mt-2 mb-4 px-5"> <div id="recipients" class="hidden mt-2 mb-4 px-5 pt-1 pb-2">
<%= form_for @template, url: template_recipients_path(@template), method: :post, html: { autocomplete: 'off', class: 'mt-1', id: :submitters_form } do |f| %> <%= render 'recipients', template: @template %>
<div class="space-y-3 divide-y">
<% @template.submitters.each_with_index do |submitter, index| %>
<div class="pt-3">
<%= f.fields_for :submitters, item = Struct.new(:name, :uuid, :is_requester, :email, :invite_by_uuid, :optional_invite_by_uuid, :linked_to_uuid, :option).new(*submitter.values_at('name', 'uuid', 'is_requester', 'email', 'invite_by_uuid', 'optional_invite_by_uuid', 'linked_to_uuid')), index: do |ff| %>
<% item.option = item.is_requester.present? ? 'is_requester' : (item.email.present? ? 'email' : (item.linked_to_uuid.present? ? "linked_to_#{item.linked_to_uuid}" : (item.invite_by_uuid.present? ? "invite_by_#{item.invite_by_uuid}" : (item.optional_invite_by_uuid.present? ? "optional_invite_by_#{item.optional_invite_by_uuid}" : '')))) %>
<%= ff.hidden_field :uuid %>
<div class="form-control">
<%= ff.text_field :name, class: 'w-full outline-none border-transparent focus:border-transparent focus:ring-0 bg-base-100 px-1 peer mb-2', autocomplete: 'off', placeholder: "#{index + 1}#{(index + 1).ordinal} Party", required: true %>
<% if @template.submitters.size == 2 %>
<%= tag.input name: ff.field_name(:email), value: ff.object.email, type: :email, class: 'base-input', multiple: true, autocomplete: 'off', placeholder: t('default_email'), disabled: ff.object.is_requester || ff.object.invite_by_uuid.present? || ff.object.optional_invite_by_uuid.present?, id: field_uuid = SecureRandom.uuid %>
<% else %>
<toggle-attribute data-target-id="<%= email_field_uuid = SecureRandom.uuid %>" data-class-name="hidden" data-value="email">
<%= ff.select :option, [[t('not_specified'), 'not_set'], [t('submission_requester'), 'is_requester'], [t('specified_email'), 'email'], *(@template.submitters - [submitter]).flat_map { |e| [[t('invite_by_name', name: e['name']), "invite_by_#{e['uuid']}"], [t('invite_by_name', name: e['name']) + " (#{t(:optional).capitalize})", "optional_invite_by_#{e['uuid']}"]] }, *(@template.submitters - [submitter]).map { |e| [t('same_as_name', name: e['name']), "linked_to_#{e['uuid']}"] }], {}, class: 'base-select mb-3' %>
</toggle-attribute>
<%= tag.input name: ff.field_name(:email), type: :email, value: ff.object.email, multiple: true, class: "base-input #{'hidden' if item.option != 'email'}", autocomplete: 'off', placeholder: t('default_email'), id: email_field_uuid %>
<% end %>
</div>
<% if @template.submitters.size == 2 %>
<checkbox-group class="mt-3 flex items-center space-x-4">
<label class="flex items-center space-x-2 cursor-pointer">
<toggle-attribute data-target-id="<%= field_uuid %>" class="flex" data-attribute="disabled">
<%= ff.check_box :is_requester, class: 'base-checkbox' %>
</toggle-attribute>
<span class="select-none">
<%= t('submission_requester') %>
</span>
</label>
<% if index == 1 %>
<label class="flex items-center space-x-2 cursor-pointer">
<toggle-attribute data-target-id="<%= field_uuid %>" class="flex" data-attribute="disabled">
<indeterminate-checkbox data-indeterminate="<%= ff.object.optional_invite_by_uuid.present? %>" data-show-indeterminate-id="invite_optional" data-name="<%= ff.field_name(:invite_by_uuid) %>" data-indeterminate-name="<%= ff.field_name(:optional_invite_by_uuid) %>" class="flex">
<%= ff.check_box ff.object.optional_invite_by_uuid.present? ? :optional_invite_by_uuid : :invite_by_uuid, { class: 'base-checkbox' }, @template.submitters.first['uuid'], '' %>
</indeterminate-checkbox>
</toggle-attribute>
<span class="select-none">
<%= t('invite_by_name', name: @template.submitters.first['name']) %> <span id="invite_optional" class="<%= 'hidden' if ff.object.optional_invite_by_uuid.blank? %>">(<%= t(:optional).capitalize %>)</span>
</span>
</label>
<% end %>
</checkbox-group>
<% end %>
<% end %>
</div>
<% end %>
</div>
<% end %>
<% unless current_account.account_configs.exists?(key: AccountConfig::ENFORCE_SIGNING_ORDER_KEY, value: true) %>
<%= form_for @template, url: template_preferences_path(@template), method: :post, html: { autocomplete: 'off', class: 'mt-2' }, data: { close_on_submit: false } do |f| %>
<div class="flex items-center pt-4 mt-4 justify-between border-t w-full">
<span>
<%= t('enforce_recipients_order') %>
</span>
<%= f.fields_for :preferences, Struct.new(:submitters_order).new(@template.preferences['submitters_order']) do |ff| %>
<%= ff.check_box :submitters_order, { class: 'toggle', onchange: 'this.form.requestSubmit()' }, 'preserved', '' %>
<% end %>
</div>
<% end %>
<% end %>
<% if can?(:manage, :personalization_advanced) %>
<%= form_for @template, url: template_preferences_path(@template), method: :post, html: { autocomplete: 'off', class: 'mt-2' }, data: { close_on_submit: false } do |f| %>
<div class="flex items-center mt-4 justify-between w-full">
<span>
<%= t('ensure_unique_recipients') %>
</span>
<%= f.fields_for :preferences, Struct.new(:validate_unique_submitters).new(@template.preferences['validate_unique_submitters']) do |ff| %>
<%= ff.check_box :validate_unique_submitters, { class: 'toggle', onchange: 'this.form.requestSubmit()' }, 'true', '' %>
<% end %>
</div>
<% end %>
<% end %>
<div class="form-control mt-5 pb-2">
<%= button_tag button_title(title: t('save'), disabled_with: t('updating')), class: 'base-button', form: :submitters_form %>
</div>
</div> </div>
<% end %> <% end %>
<% if show_api %> <% if show_api %>
+31 -2
View File
@@ -1,10 +1,10 @@
<%= render 'shared/turbo_modal_large', title: t('share_link') do %> <%= render 'shared/turbo_modal_large', title: t('share_link') do %>
<div class="mt-2 mb-4 px-5"> <div class="mt-2 mb-4 px-5">
<%= form_for @template, url: template_share_link_path(@template), method: :post, html: { id: 'shared_link_form', autocomplete: 'off', class: 'mt-3' }, data: { close_on_submit: false } do |f| %> <%= form_for @template, url: template_share_link_path(@template), method: :post, html: { id: 'shared_link_form', autocomplete: 'off', class: 'mt-3' }, data: { close_on_submit: false } do |f| %>
<div class="flex items-center justify-between gap-1 px-1"> <label for="template_shared_link" class="flex items-center my-4 justify-between gap-1 alert bg-base-100 border-base-300">
<span><%= t('enable_shared_link') %></span> <span><%= t('enable_shared_link') %></span>
<%= f.check_box :shared_link, { disabled: !can?(:update, @template), class: 'toggle', onchange: 'this.form.requestSubmit()' }, 'true', 'false' %> <%= f.check_box :shared_link, { disabled: !can?(:update, @template), class: 'toggle', onchange: 'this.form.requestSubmit()' }, 'true', 'false' %>
</div> </label>
<div class="flex gap-2 mt-3"> <div class="flex gap-2 mt-3">
<input id="embedding_url" type="text" value="<%= start_form_url(slug: @template.slug) %>" class="base-input w-full" autocomplete="off" readonly> <input id="embedding_url" type="text" value="<%= start_form_url(slug: @template.slug) %>" class="base-input w-full" autocomplete="off" readonly>
<check-on-click data-element-id="template_shared_link"> <check-on-click data-element-id="template_shared_link">
@@ -12,5 +12,34 @@
</check-on-click> </check-on-click>
</div> </div>
<% end %> <% end %>
<%= form_for @template, url: template_preferences_path(@template), method: :post, html: { autocomplete: 'off', class: 'mt-4 mb-5' }, data: { close_on_submit: false } do |f| %>
<% link_form_fields = @template.preferences.fetch('link_form_fields', ['email']) %>
<label class="pl-1"><%= t('link_form_fields') %></label>
<required-checkbox-group class="flex flex-col md:flex-row items-center gap-2 w-full mt-2">
<% %w[name email phone].each do |field| %>
<%= label_tag "link_form_fields_#{field}", t(field), class: 'relative flex w-full md:w-1/3 items-center h-12 border-base-300 py-3.5 border rounded-xl' do %>
<%= check_box_tag 'template[preferences][link_form_fields][]', field, link_form_fields.include?(field), class: 'absolute !animate-none checkbox left-3', id: "link_form_fields_#{field}" %>
<span class="font-medium w-full text-center"><%= t(field) %></span>
<% end %>
<% end %>
</required-checkbox-group>
<% end %>
<% if Templates.filter_undefined_submitters(@template.submitters).size > 1 %>
<div class="alert items-start bg-base-100 border-base-300 mt-4">
<%= svg_icon('info_circle', class: 'stroke-current shrink-0 h-6 w-6 mt-1') %>
<div><%= t('this_template_has_multiple_parties_which_prevents_the_use_of_a_sharing_link') %></div>
</div>
<% end %>
<% if @template.submitters.to_a.length > 1 %>
<div class="collapse collapse-arrow join-item border border-base-300 mt-4 mb-5">
<input type="checkbox" name="accordion">
<div class="collapse-title text-xl font-medium">
<%= t('default_parties') %>
</div>
<div class="collapse-content !pb-0">
<%= render 'templates_preferences/recipients', template: @template, close_on_submit: false, with_toggles: false, with_submission_requester: false %>
</div>
</div>
<% end %>
</div> </div>
<% end %> <% end %>
+166 -10
View File
@@ -22,7 +22,10 @@ en: &en
hi_there: Hi there hi_there: Hi there
thanks: Thanks thanks: Thanks
private: Private private: Private
default_parties: Default parties
authenticate_embedded_form_preview_with_token: Authenticate embedded form preview with token
stripe_integration: Stripe Integration stripe_integration: Stripe Integration
require_all_recipients: Require all recipients
stripe_account_has_been_connected: Stripe account has been connected. stripe_account_has_been_connected: Stripe account has been connected.
re_connect_stripe: Re-connect Stripe re_connect_stripe: Re-connect Stripe
bcc_recipients: BCC recipients bcc_recipients: BCC recipients
@@ -113,6 +116,11 @@ en: &en
role: Role role: Role
reason: Reason reason: Reason
provide_your_email_to_start: Provide your email to start provide_your_email_to_start: Provide your email to start
provide_your_email: Provide your email
provide_your_name_to_start: Provide your name to start
provide_your_name: Provide your name
provide_your_phone_in_international_format_to_start: Provide your phone in international format to start
provide_your_phone_in_international_format: Provide your phone in international format
start: Start start: Start
enforce_recipients_order: Enforce recipients order enforce_recipients_order: Enforce recipients order
starting: Starting starting: Starting
@@ -749,6 +757,12 @@ en: &en
share_link: Share link share_link: Share link
enable_shared_link: Enable shared link enable_shared_link: Enable shared link
share_link_is_currently_disabled: Share link is currently disabled share_link_is_currently_disabled: Share link is currently disabled
select_data_residency: Select data residency
account_name_has_invited_you_to_fill_and_sign_documents_online_effortlessly_with_a_secure_fast_and_user_friendly_digital_document_signing_solution: '%{account_name} has invited you to fill and sign documents online effortlessly with a secure, fast, and user-friendly digital document signing solution.'
review_or_download_completed_documents_fill_and_sign_documents_online_effortlessly_with_a_secure_fast_and_user_friendly_digital_document_signing_solution: Review or download completed documents. Fill and sign documents online effortlessly with a secure, fast, and user-friendly digital document signing solution.
link_form_fields: Link form fields
at_least_one_field_must_be_displayed_in_the_form: At least one field must be displayed in the form.
this_template_has_multiple_parties_which_prevents_the_use_of_a_sharing_link: This template has multiple parties, which prevents the use of a shared link as it's unclear which party is responsible for specific fields. To resolve this, define the default party details.
submission_sources: submission_sources:
api: API api: API
bulk: Bulk Send bulk: Bulk Send
@@ -851,6 +865,9 @@ en: &en
range_without_total: "%{from}-%{to} items" range_without_total: "%{from}-%{to} items"
es: &es es: &es
default_parties: Partes predeterminadas
authenticate_embedded_form_preview_with_token: Autenticar vista previa del formulario incrustado con token
require_all_recipients: Requerir a todos los destinatarios
stripe_integration: Integración con Stripe stripe_integration: Integración con Stripe
stripe_account_has_been_connected: La cuenta de Stripe ha sido conectada. stripe_account_has_been_connected: La cuenta de Stripe ha sido conectada.
re_connect_stripe: Volver a conectar Stripe re_connect_stripe: Volver a conectar Stripe
@@ -946,6 +963,11 @@ es: &es
role: Rol role: Rol
reason: Razón reason: Razón
provide_your_email_to_start: Proporciona tu correo electrónico para comenzar provide_your_email_to_start: Proporciona tu correo electrónico para comenzar
provide_your_email: Proporciona tu correo electrónico
provide_your_name_to_start: Proporciona tu nombre para comenzar
provide_your_name: Proporciona tu nombre
provide_your_phone_in_international_format_to_start: Proporciona tu teléfono en formato internacional para comenzar
provide_your_phone_in_international_format: Proporciona tu teléfono en formato internacional
start: Comenzar start: Comenzar
starting: Comenzando starting: Comenzando
form_has_been_deleted_by_html: 'El formulario ha sido eliminado por <span class="font-semibold">%{name}</span>.' form_has_been_deleted_by_html: 'El formulario ha sido eliminado por <span class="font-semibold">%{name}</span>.'
@@ -1581,6 +1603,12 @@ es: &es
share_link: Enlace para compartir share_link: Enlace para compartir
enable_shared_link: Habilitar enlace compartido enable_shared_link: Habilitar enlace compartido
share_link_is_currently_disabled: El enlace compartido está deshabilitado actualmente share_link_is_currently_disabled: El enlace compartido está deshabilitado actualmente
select_data_residency: Seleccionar ubicación de datos
account_name_has_invited_you_to_fill_and_sign_documents_online_effortlessly_with_a_secure_fast_and_user_friendly_digital_document_signing_solution: '%{account_name} te ha invitado a completar y firmar documentos en línea fácilmente con una solución de firma digital segura, rápida y fácil de usar.'
review_or_download_completed_documents_fill_and_sign_documents_online_effortlessly_with_a_secure_fast_and_user_friendly_digital_document_signing_solution: Revisa o descarga los documentos completados. Completa y firma documentos en línea fácilmente con una solución de firma digital segura, rápida y fácil de usar.
link_form_fields: Vincular campos del formulario
at_least_one_field_must_be_displayed_in_the_form: Al menos un campo debe mostrarse en el formulario.
this_template_has_multiple_parties_which_prevents_the_use_of_a_sharing_link: Esta plantilla tiene varias partes, lo que impide el uso de un enlace compartido porque no está claro qué parte es responsable de campos específicos. Para resolverlo, define los detalles predeterminados de la parte.
submission_sources: submission_sources:
api: API api: API
bulk: Envío masivo bulk: Envío masivo
@@ -1683,6 +1711,9 @@ es: &es
range_without_total: "%{from}-%{to} elementos" range_without_total: "%{from}-%{to} elementos"
it: &it it: &it
default_parties: Parti predefiniti
authenticate_embedded_form_preview_with_token: "Autentica l'anteprima del modulo incorporato con il token"
require_all_recipients: Richiedi tutti i destinatari
stripe_integration: Integrazione Stripe stripe_integration: Integrazione Stripe
stripe_account_has_been_connected: L'account Stripe è stato collegato. stripe_account_has_been_connected: L'account Stripe è stato collegato.
re_connect_stripe: Ricollega Stripe re_connect_stripe: Ricollega Stripe
@@ -1777,6 +1808,11 @@ it: &it
role: Ruolo role: Ruolo
reason: Ragione reason: Ragione
provide_your_email_to_start: Fornisci la tua email per iniziare provide_your_email_to_start: Fornisci la tua email per iniziare
provide_your_email: Fornisci la tua email
provide_your_name_to_start: Fornisci il tuo nome per iniziare
provide_your_name: Fornisci il tuo nome
provide_your_phone_in_international_format_to_start: Fornisci il tuo telefono in formato internazionale per iniziare
provide_your_phone_in_international_format: Fornisci il tuo telefono in formato internazionale
start: Inizia start: Inizia
starting: Iniziando starting: Iniziando
form_has_been_deleted_by_html: 'Il modulo è stato eliminato da <span class="font-semibold">%{name}</span>.' form_has_been_deleted_by_html: 'Il modulo è stato eliminato da <span class="font-semibold">%{name}</span>.'
@@ -2411,6 +2447,12 @@ it: &it
share_link: Link di condivisione share_link: Link di condivisione
enable_shared_link: Abilita link condiviso enable_shared_link: Abilita link condiviso
share_link_is_currently_disabled: Il link condiviso è attualmente disabilitato share_link_is_currently_disabled: Il link condiviso è attualmente disabilitato
select_data_residency: Seleziona la residenza dei dati
account_name_has_invited_you_to_fill_and_sign_documents_online_effortlessly_with_a_secure_fast_and_user_friendly_digital_document_signing_solution: '%{account_name} ti ha invitato a compilare e firmare documenti online con facilità utilizzando una soluzione di firma digitale sicura, veloce e facile da usare.'
review_or_download_completed_documents_fill_and_sign_documents_online_effortlessly_with_a_secure_fast_and_user_friendly_digital_document_signing_solution: Rivedi o scarica i documenti completati. Compila e firma documenti online facilmente con una soluzione di firma digitale sicura, veloce e facile da usare.
link_form_fields: Collega i campi del modulo
at_least_one_field_must_be_displayed_in_the_form: Almeno un campo deve essere visualizzato nel modulo.
this_template_has_multiple_parties_which_prevents_the_use_of_a_sharing_link: Questo modello ha più parti, il che impedisce l’uso di un link di condivisione perché non è chiaro quale parte sia responsabile di campi specifici. Per risolvere, definisci i dettagli predefiniti della parte.
submission_sources: submission_sources:
api: API api: API
bulk: Invio massivo bulk: Invio massivo
@@ -2513,6 +2555,9 @@ it: &it
range_without_total: "%{from}-%{to} elementi" range_without_total: "%{from}-%{to} elementi"
fr: &fr fr: &fr
default_parties: Parties par défaut
authenticate_embedded_form_preview_with_token: Authentifier l’aperçu du formulaire intégré avec un jeton
require_all_recipients: Exiger tous les destinataires
stripe_integration: Intégration Stripe stripe_integration: Intégration Stripe
stripe_account_has_been_connected: Le compte Stripe a été connecté. stripe_account_has_been_connected: Le compte Stripe a été connecté.
re_connect_stripe: Reconnecter Stripe re_connect_stripe: Reconnecter Stripe
@@ -2607,7 +2652,12 @@ fr: &fr
digitally_signed_by: Signé numériquement par digitally_signed_by: Signé numériquement par
role: Rôle role: Rôle
reason: Raison reason: Raison
provide_your_email_to_start: Entrez votre adresse email pour commencer provide_your_email_to_start: Fournissez votre e-mail pour commencer
provide_your_email: Fournissez votre e-mail
provide_your_name_to_start: Fournissez votre nom pour commencer
provide_your_name: Fournissez votre nom
provide_your_phone_in_international_format_to_start: Fournissez votre téléphone au format international pour commencer
provide_your_phone_in_international_format: Fournissez votre téléphone au format international
start: Démarrer start: Démarrer
starting: Démarrage starting: Démarrage
form_has_been_deleted_by_html: 'Le formulaire a été supprimé par <span class="font-semibold">%{name}</span>.' form_has_been_deleted_by_html: 'Le formulaire a été supprimé par <span class="font-semibold">%{name}</span>.'
@@ -3244,6 +3294,12 @@ fr: &fr
share_link: Lien de partage share_link: Lien de partage
enable_shared_link: Activer le lien de partage enable_shared_link: Activer le lien de partage
share_link_is_currently_disabled: Le lien de partage est actuellement désactivé share_link_is_currently_disabled: Le lien de partage est actuellement désactivé
select_data_residency: Sélectionner la résidence des données
account_name_has_invited_you_to_fill_and_sign_documents_online_effortlessly_with_a_secure_fast_and_user_friendly_digital_document_signing_solution: '%{account_name} vous a invité à remplir et signer des documents en ligne facilement avec une solution de signature numérique sécurisée, rapide et conviviale.'
review_or_download_completed_documents_fill_and_sign_documents_online_effortlessly_with_a_secure_fast_and_user_friendly_digital_document_signing_solution: Consultez ou téléchargez les documents complétés. Remplissez et signez des documents en ligne facilement avec une solution de signature numérique sécurisée, rapide et conviviale.
link_form_fields: Lier les champs du formulaire
at_least_one_field_must_be_displayed_in_the_form: Au moins un champ doit être affiché dans le formulaire.
this_template_has_multiple_parties_which_prevents_the_use_of_a_sharing_link: Ce modèle contient plusieurs parties, ce qui empêche l’utilisation d’un lien de partage car il n’est pas clair quelle partie est responsable de certains champs. Pour résoudre cela, définissez les détails de la partie par défaut.
submission_sources: submission_sources:
api: API api: API
bulk: Envoi en masse bulk: Envoi en masse
@@ -3346,6 +3402,9 @@ fr: &fr
range_without_total: "%{from} à %{to} éléments" range_without_total: "%{from} à %{to} éléments"
pt: &pt pt: &pt
default_parties: Partes padrão
authenticate_embedded_form_preview_with_token: Autenticar visualização incorporada do formulário com token
require_all_recipients: Exigir todos os destinatários
stripe_integration: Integração com Stripe stripe_integration: Integração com Stripe
stripe_account_has_been_connected: Conta Stripe foi conectada. stripe_account_has_been_connected: Conta Stripe foi conectada.
re_connect_stripe: Reconectar Stripe re_connect_stripe: Reconectar Stripe
@@ -3440,7 +3499,12 @@ pt: &pt
digitally_signed_by: Assinado digitalmente por digitally_signed_by: Assinado digitalmente por
role: Função role: Função
reason: Motivo reason: Motivo
provide_your_email_to_start: Forneça o seu email para começar provide_your_email_to_start: Informe seu e-mail para começar
provide_your_email: Informe seu e-mail
provide_your_name_to_start: Informe seu nome para começar
provide_your_name: Informe seu nome
provide_your_phone_in_international_format_to_start: Informe seu telefone no formato internacional para começar
provide_your_phone_in_international_format: Informe seu telefone no formato internacional
start: Iniciar start: Iniciar
starting: Iniciando starting: Iniciando
form_has_been_deleted_by_html: 'O formulário foi eliminado por <span class="font-semibold">%{name}</span>.' form_has_been_deleted_by_html: 'O formulário foi eliminado por <span class="font-semibold">%{name}</span>.'
@@ -4076,6 +4140,12 @@ pt: &pt
share_link: Link de compartilhamento share_link: Link de compartilhamento
enable_shared_link: Ativar link compartilhado enable_shared_link: Ativar link compartilhado
share_link_is_currently_disabled: O link compartilhado está desativado no momento share_link_is_currently_disabled: O link compartilhado está desativado no momento
select_data_residency: Selecionar local dos dados
account_name_has_invited_you_to_fill_and_sign_documents_online_effortlessly_with_a_secure_fast_and_user_friendly_digital_document_signing_solution: '%{account_name} convidou você para preencher e assinar documentos online com facilidade usando uma solução de assinatura digital segura, rápida e fácil de usar.'
review_or_download_completed_documents_fill_and_sign_documents_online_effortlessly_with_a_secure_fast_and_user_friendly_digital_document_signing_solution: Reveja ou baixe os documentos concluídos. Preencha e assine documentos online com facilidade usando uma solução de assinatura digital segura, rápida e fácil de usar.
link_form_fields: Vincular campos do formulário
at_least_one_field_must_be_displayed_in_the_form: Pelo menos um campo deve ser exibido no formulário.
this_template_has_multiple_parties_which_prevents_the_use_of_a_sharing_link: Este modelo tem várias partes, o que impede o uso de um link de compartilhamento, pois não está claro qual parte é responsável por campos específicos. Para resolver isso, defina os detalhes padrão da parte.
submission_sources: submission_sources:
api: API api: API
bulk: Envio em massa bulk: Envio em massa
@@ -4179,6 +4249,9 @@ pt: &pt
range_without_total: "%{from}-%{to} itens" range_without_total: "%{from}-%{to} itens"
de: &de de: &de
default_parties: Standardparteien
authenticate_embedded_form_preview_with_token: Authentifizieren Sie die eingebettete Formularvorschau mit Token
require_all_recipients: Alle Empfänger erforderlich
stripe_integration: Stripe-Integration stripe_integration: Stripe-Integration
stripe_account_has_been_connected: Stripe-Konto wurde verbunden. stripe_account_has_been_connected: Stripe-Konto wurde verbunden.
re_connect_stripe: Stripe erneut verbinden re_connect_stripe: Stripe erneut verbinden
@@ -4273,7 +4346,12 @@ de: &de
digitally_signed_by: Digital signiert von digitally_signed_by: Digital signiert von
role: Rolle role: Rolle
reason: Grund reason: Grund
provide_your_email_to_start: Gib deine E-Mail-Adresse ein, um zu starten provide_your_email_to_start: Geben Sie Ihre E-Mail-Adresse ein, um zu starten
provide_your_email: Geben Sie Ihre E-Mail-Adresse ein
provide_your_name_to_start: Geben Sie Ihren Namen ein, um zu starten
provide_your_name: Geben Sie Ihren Namen ein
provide_your_phone_in_international_format_to_start: Geben Sie Ihre Telefonnummer im internationalen Format ein, um zu starten
provide_your_phone_in_international_format: Geben Sie Ihre Telefonnummer im internationalen Format ein
start: Starten start: Starten
starting: Starten starting: Starten
form_has_been_deleted_by_html: 'Das Formular wurde von <span class="font-semibold">%{name}</span> gelöscht.' form_has_been_deleted_by_html: 'Das Formular wurde von <span class="font-semibold">%{name}</span> gelöscht.'
@@ -4909,6 +4987,12 @@ de: &de
share_link: Freigabelink share_link: Freigabelink
enable_shared_link: 'Freigabelink aktivieren' enable_shared_link: 'Freigabelink aktivieren'
share_link_is_currently_disabled: 'Freigabelink ist derzeit deaktiviert' share_link_is_currently_disabled: 'Freigabelink ist derzeit deaktiviert'
select_data_residency: Datenstandort auswählen
account_name_has_invited_you_to_fill_and_sign_documents_online_effortlessly_with_a_secure_fast_and_user_friendly_digital_document_signing_solution: '%{account_name} hat Sie eingeladen, Dokumente mühelos online mit einer sicheren, schnellen und benutzerfreundlichen digitalen Signaturlösung auszufüllen und zu unterschreiben.'
review_or_download_completed_documents_fill_and_sign_documents_online_effortlessly_with_a_secure_fast_and_user_friendly_digital_document_signing_solution: Überprüfen oder laden Sie abgeschlossene Dokumente herunter. Füllen und unterschreiben Sie Dokumente mühelos online mit einer sicheren, schnellen und benutzerfreundlichen digitalen Signaturlösung.
link_form_fields: Formularfelder verknüpfen
at_least_one_field_must_be_displayed_in_the_form: Mindestens ein Feld muss im Formular angezeigt werden.
this_template_has_multiple_parties_which_prevents_the_use_of_a_sharing_link: Diese Vorlage enthält mehrere Parteien, was die Verwendung eines Freigabelinks verhindert, da unklar ist, welche Partei für bestimmte Felder verantwortlich ist. Um dies zu beheben, definieren Sie die Standardparteidetails.
submission_sources: submission_sources:
api: API api: API
bulk: Massenversand bulk: Massenversand
@@ -5033,7 +5117,13 @@ pl:
digitally_signed_by: Podpis cyfrowy przez digitally_signed_by: Podpis cyfrowy przez
form_expired_at_html: 'Formularz wygasł o <span class="font-semibold">%{time}</span>' form_expired_at_html: 'Formularz wygasł o <span class="font-semibold">%{time}</span>'
role: Rola role: Rola
provide_your_email_to_start: Podaj swój adres email, aby rozpocząć provide_your_email_to_start: Podaj swój e-mail, aby rozpocząć
provide_your_email: Podaj swój e-mail
provide_your_name_to_start: Podaj swoje imię, aby rozpocząć
provide_your_name: Podaj swoje imię
provide_your_phone_in_international_format_to_start: Podaj numer telefonu w formacie międzynarodowym, aby rozpocząć
provide_your_phone_in_international_format: Podaj numer telefonu w formacie międzynarodowym
use_international_format_1xxx_: 'Użyj formatu międzynarodowego: +1xxx...'
start: Rozpocznij start: Rozpocznij
reason: Powód reason: Powód
starting: Rozpoczynanie starting: Rozpoczynanie
@@ -5080,6 +5170,9 @@ pl:
please_enter_your_email_address_associated_with_the_completed_submission: Wprowadź adres e-mail powiązany z ukończonym zgłoszeniem. please_enter_your_email_address_associated_with_the_completed_submission: Wprowadź adres e-mail powiązany z ukończonym zgłoszeniem.
privacy_policy: Polityka Prywatności privacy_policy: Polityka Prywatności
esignature_disclosure: Użycie e-podpisu esignature_disclosure: Użycie e-podpisu
select_data_residency: Wybierz lokalizację danych
company_name: Nazwa firmy
optional: opcjonalne
uk: uk:
require_phone_2fa_to_open: Вимагати двофакторну автентифікацію через телефон для відкриття require_phone_2fa_to_open: Вимагати двофакторну автентифікацію через телефон для відкриття
@@ -5103,7 +5196,13 @@ uk:
digitally_signed_by: Цифровий підпис від digitally_signed_by: Цифровий підпис від
verification_code_code: 'Код підтвердження: %{code}' verification_code_code: 'Код підтвердження: %{code}'
role: Роль role: Роль
provide_your_email_to_start: Введіть свій email, щоб почати provide_your_email_to_start: Введіть свій емейл, щоб почати
provide_your_email: Введіть свій емейл
provide_your_name_to_start: Введіть своє ім’я, щоб почати
provide_your_name: Введіть своє ім’я
provide_your_phone_in_international_format_to_start: Введіть номер телефону у міжнародному форматі, щоб почати
provide_your_phone_in_international_format: Введіть номер телефону у міжнародному форматі
use_international_format_1xxx_: 'Використовуйте міжнародний формат: +1xxx...'
form_expired_at_html: 'Строк подачі завершився о <span class="font-semibold">%{time}</span>' form_expired_at_html: 'Строк подачі завершився о <span class="font-semibold">%{time}</span>'
start: Почати start: Почати
reason: Причина reason: Причина
@@ -5151,6 +5250,9 @@ uk:
please_enter_your_email_address_associated_with_the_completed_submission: "Введіть адресу електронної пошти, пов'язану із завершеним поданням." please_enter_your_email_address_associated_with_the_completed_submission: "Введіть адресу електронної пошти, пов'язану із завершеним поданням."
privacy_policy: Політика конфіденційності privacy_policy: Політика конфіденційності
esignature_disclosure: Використання e-підпису esignature_disclosure: Використання e-підпису
select_data_residency: Виберіть місце зберігання даних
company_name: Назва компанії
optional: необов’язково
cs: cs:
require_phone_2fa_to_open: Vyžadovat otevření pomocí telefonního 2FA require_phone_2fa_to_open: Vyžadovat otevření pomocí telefonního 2FA
@@ -5174,7 +5276,13 @@ cs:
digitally_signed_by: Digitálně podepsáno uživatelem digitally_signed_by: Digitálně podepsáno uživatelem
verification_code_code: 'Ověřovací kód: %{code}' verification_code_code: 'Ověřovací kód: %{code}'
role: Role role: Role
provide_your_email_to_start: Zadejte svůj email pro zahájení provide_your_email_to_start: Zadejte svůj e-mail pro zahájení
provide_your_email: Zadejte svůj e-mail
provide_your_name_to_start: Zadejte své jméno pro zahájení
provide_your_name: Zadejte své jméno
provide_your_phone_in_international_format_to_start: Zadejte své telefonní číslo v mezinárodním formátu pro zahájení
provide_your_phone_in_international_format: Zadejte své telefonní číslo v mezinárodním formátu
use_international_format_1xxx_: 'Použijte mezinárodní formát: +1xxx...'
reason: Důvod reason: Důvod
form_expired_at_html: 'Formulář vypršel <span class="font-semibold">%{time}</span>' form_expired_at_html: 'Formulář vypršel <span class="font-semibold">%{time}</span>'
start: Zahájit start: Zahájit
@@ -5222,6 +5330,9 @@ cs:
please_enter_your_email_address_associated_with_the_completed_submission: Zadejte e-mailovou adresu spojenou s dokončeným odesláním. please_enter_your_email_address_associated_with_the_completed_submission: Zadejte e-mailovou adresu spojenou s dokončeným odesláním.
privacy_policy: Zásady Ochrany Osobních Údajů privacy_policy: Zásady Ochrany Osobních Údajů
esignature_disclosure: Použití e-podpisu esignature_disclosure: Použití e-podpisu
select_data_residency: Vyberte umístění dat
company_name: Název společnosti
optional: volitelné
he: he:
require_phone_2fa_to_open: דרוש אימות דו-שלבי באמצעות טלפון לפתיחה require_phone_2fa_to_open: דרוש אימות דו-שלבי באמצעות טלפון לפתיחה
@@ -5246,7 +5357,13 @@ he:
role: תפקיד role: תפקיד
reason: סיבה reason: סיבה
verification_code_code: 'קוד אימות: %{code}' verification_code_code: 'קוד אימות: %{code}'
provide_your_email_to_start: ספק את כתובת הדוא"ל שלך כדי להתחיל provide_your_email_to_start: הזן את האימייל שלך כדי להתחיל
provide_your_email: הזן את האימייל שלך
provide_your_name_to_start: הזן את שמך כדי להתחיל
provide_your_name: הזן את שמך
provide_your_phone_in_international_format_to_start: הזן את מספר הטלפון שלך בפורמט בינלאומי כדי להתחיל
provide_your_phone_in_international_format: הזן את מספר הטלפון שלך בפורמט בינלאומי
use_international_format_1xxx_: 'השתמש בפורמט בינלאומי: +1xxx...'
start: התחל start: התחל
starting: מתחיל starting: מתחיל
form_expired_at_html: 'הטופס פג תוקף ב- <span class="font-semibold">%{time}</span>' form_expired_at_html: 'הטופס פג תוקף ב- <span class="font-semibold">%{time}</span>'
@@ -5293,6 +5410,9 @@ he:
please_enter_your_email_address_associated_with_the_completed_submission: 'אנא הזן את כתובת הדוא"ל המשויכת למשלוח שהושלם.' please_enter_your_email_address_associated_with_the_completed_submission: 'אנא הזן את כתובת הדוא"ל המשויכת למשלוח שהושלם.'
privacy_policy: 'מדיניות פרטיות' privacy_policy: 'מדיניות פרטיות'
esignature_disclosure: 'גילוי חתימה אלקטרונית' esignature_disclosure: 'גילוי חתימה אלקטרונית'
select_data_residency: בחר מיקום נתונים
company_name: שם החברה
optional: אופציונלי
nl: nl:
require_phone_2fa_to_open: Vereis telefoon 2FA om te openen require_phone_2fa_to_open: Vereis telefoon 2FA om te openen
@@ -5316,7 +5436,13 @@ nl:
digitally_signed_by: Digitaal ondertekend door digitally_signed_by: Digitaal ondertekend door
role: Rol role: Rol
verification_code_code: 'Verificatiecode: %{code}' verification_code_code: 'Verificatiecode: %{code}'
provide_your_email_to_start: Geef uw e-mailadres om te beginnen provide_your_email_to_start: Voer je e-mailadres in om te beginnen
provide_your_email: Voer je e-mailadres in
provide_your_name_to_start: Voer je naam in om te beginnen
provide_your_name: Voer je naam in
provide_your_phone_in_international_format_to_start: Voer je telefoonnummer in internationaal formaat in om te beginnen
provide_your_phone_in_international_format: Voer je telefoonnummer in internationaal formaat in
use_international_format_1xxx_: 'Gebruik het internationale formaat: +1xxx...'
start: Start start: Start
reason: Reden reason: Reden
form_expired_at_html: 'Formulier is verlopen op <span class="font-semibold">%{time}</span>' form_expired_at_html: 'Formulier is verlopen op <span class="font-semibold">%{time}</span>'
@@ -5364,6 +5490,9 @@ nl:
please_enter_your_email_address_associated_with_the_completed_submission: Voer het e-mailadres in dat is gekoppeld aan de voltooide indiening. please_enter_your_email_address_associated_with_the_completed_submission: Voer het e-mailadres in dat is gekoppeld aan de voltooide indiening.
privacy_policy: Privacybeleid privacy_policy: Privacybeleid
esignature_disclosure: Gebruik van e-handtekening esignature_disclosure: Gebruik van e-handtekening
select_data_residency: Selecteer gegevenslocatie
company_name: Bedrijfsnaam
optional: optioneel
ar: ar:
require_phone_2fa_to_open: "تطلب فتح عبر تحقق الهاتف ذو العاملين" require_phone_2fa_to_open: "تطلب فتح عبر تحقق الهاتف ذو العاملين"
@@ -5386,7 +5515,13 @@ ar:
email: البريد الإلكتروني email: البريد الإلكتروني
digitally_signed_by: تم التوقيع الرقمي بواسطة digitally_signed_by: تم التوقيع الرقمي بواسطة
role: الدور role: الدور
provide_your_email_to_start: قدم بريدك الإلكتروني للبدء provide_your_email_to_start: أدخل بريدك الإلكتروني للبدء
provide_your_email: أدخل بريدك الإلكتروني
provide_your_name_to_start: أدخل اسمك للبدء
provide_your_name: أدخل اسمك
provide_your_phone_in_international_format_to_start: أدخل رقم هاتفك بصيغة دولية للبدء
provide_your_phone_in_international_format: أدخل رقم هاتفك بصيغة دولية
use_international_format_1xxx_: 'استخدم التنسيق الدولي: +1xxx...'
start: بدء start: بدء
starting: بداية starting: بداية
verification_code_code: 'رمز التحقق: %{code}' verification_code_code: 'رمز التحقق: %{code}'
@@ -5435,6 +5570,9 @@ ar:
please_enter_your_email_address_associated_with_the_completed_submission: 'يرجى إدخال عنوان البريد الإلكتروني المرتبط بالإرسال المكتمل.' please_enter_your_email_address_associated_with_the_completed_submission: 'يرجى إدخال عنوان البريد الإلكتروني المرتبط بالإرسال المكتمل.'
privacy_policy: 'سياسة الخصوصية' privacy_policy: 'سياسة الخصوصية'
esignature_disclosure: 'إفصاح التوقيع الإلكتروني' esignature_disclosure: 'إفصاح التوقيع الإلكتروني'
select_data_residency: اختر موقع تخزين البيانات
company_name: اسم الشركة
optional: اختياري
ko: ko:
require_phone_2fa_to_open: 휴대폰 2FA를 열 때 요구함 require_phone_2fa_to_open: 휴대폰 2FA를 열 때 요구함
@@ -5457,7 +5595,13 @@ ko:
email: 이메일 email: 이메일
digitally_signed_by: 디지털로 서명됨 digitally_signed_by: 디지털로 서명됨
role: 역할 role: 역할
provide_your_email_to_start: 시작하려면 이메일을 제공하세요 provide_your_email_to_start: 시작하려면 이메일을 입력하세요
provide_your_email: 이메일을 입력하세요
provide_your_name_to_start: 시작하려면 이름을 입력하세요
provide_your_name: 이름을 입력하세요
provide_your_phone_in_international_format_to_start: 시작하려면 국제 형식의 전화번호를 입력하세요
provide_your_phone_in_international_format: 국제 형식의 전화번호를 입력하세요
use_international_format_1xxx_: '국제 형식을 사용하세요: +1xxx...'
start: 시작 start: 시작
reason: 이유 reason: 이유
starting: 시작 중 starting: 시작 중
@@ -5506,6 +5650,9 @@ ko:
please_enter_your_email_address_associated_with_the_completed_submission: '완료된 제출과 연결된 이메일 주소를 입력하세요.' please_enter_your_email_address_associated_with_the_completed_submission: '완료된 제출과 연결된 이메일 주소를 입력하세요.'
privacy_policy: 개인정보 처리방침 privacy_policy: 개인정보 처리방침
esignature_disclosure: 전자서명 공개 esignature_disclosure: 전자서명 공개
select_data_residency: 데이터 저장 위치 선택
company_name: 회사 이름
optional: 선택 사항
ja: ja:
require_phone_2fa_to_open: 電話による2段階認証が必要です require_phone_2fa_to_open: 電話による2段階認証が必要です
@@ -5529,6 +5676,12 @@ ja:
digitally_signed_by: 電子署名者 digitally_signed_by: 電子署名者
role: 役割 role: 役割
provide_your_email_to_start: 開始するにはメールアドレスを入力してください provide_your_email_to_start: 開始するにはメールアドレスを入力してください
provide_your_email: メールアドレスを入力してください
provide_your_name_to_start: 開始するには名前を入力してください
provide_your_name: 名前を入力してください
provide_your_phone_in_international_format_to_start: 開始するには国際形式の電話番号を入力してください
provide_your_phone_in_international_format: 国際形式の電話番号を入力してください
use_international_format_1xxx_: '国際形式を使用してください:+1xxx...'
start: 開始 start: 開始
reason: 理由 reason: 理由
starting: 開始中 starting: 開始中
@@ -5577,6 +5730,9 @@ ja:
please_enter_your_email_address_associated_with_the_completed_submission: '完了した提出に関連付けられたメールアドレスを入力してください。' please_enter_your_email_address_associated_with_the_completed_submission: '完了した提出に関連付けられたメールアドレスを入力してください。'
privacy_policy: プライバシーポリシー privacy_policy: プライバシーポリシー
esignature_disclosure: 電子署名に関する開示 esignature_disclosure: 電子署名に関する開示
select_data_residency: データ保存場所を選択
company_name: 会社名
optional: 任意
en-US: en-US:
<<: *en <<: *en
+1
View File
@@ -163,6 +163,7 @@ Rails.application.routes.draw do
scope '/settings', as: :settings do scope '/settings', as: :settings do
unless Docuseal.multitenant? unless Docuseal.multitenant?
resources :storage, only: %i[index create], controller: 'storage_settings' resources :storage, only: %i[index create], controller: 'storage_settings'
resources :search_entries_reindex, only: %i[create]
resources :sms, only: %i[index], controller: 'sms_settings' resources :sms, only: %i[index], controller: 'sms_settings'
end end
resources :email, only: %i[index create], controller: 'email_smtp_settings' resources :email, only: %i[index create], controller: 'email_smtp_settings'
@@ -0,0 +1,8 @@
# frozen_string_literal: true
class AddEmailEventsEventTypeIndex < ActiveRecord::Migration[8.0]
def change
add_index :email_events, :email, where: "event_type IN ('bounce', 'soft_bounce', 'complaint', 'soft_complaint')",
name: 'index_email_events_on_email_event_types'
end
end
@@ -0,0 +1,7 @@
# frozen_string_literal: true
class AddTemplatesFolderIndex < ActiveRecord::Migration[8.0]
def change
add_index :templates, %i[account_id folder_id id], where: 'archived_at IS NULL'
end
end
@@ -0,0 +1,10 @@
# frozen_string_literal: true
class AddSubmissionsTemplateIndex < ActiveRecord::Migration[8.0]
def change
add_index :submissions, %i[account_id template_id id], where: 'archived_at IS NULL'
add_index :submissions, %i[account_id template_id id],
where: 'archived_at IS NOT NULL',
name: 'index_submissions_on_account_id_and_template_id_and_id_archived'
end
end
@@ -0,0 +1,8 @@
# frozen_string_literal: true
class AddArchivedTemplatesIndex < ActiveRecord::Migration[8.0]
def change
add_index :templates, %i[account_id id], where: 'archived_at IS NOT NULL',
name: 'index_templates_on_account_id_and_id_archived'
end
end
+6 -1
View File
@@ -10,7 +10,7 @@
# #
# It's strongly recommended that you check this file into your version control system. # It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema[8.0].define(version: 2025_06_15_091654) do ActiveRecord::Schema[8.0].define(version: 2025_06_18_085322) do
# These are extensions that must be enabled in order to support this database # These are extensions that must be enabled in order to support this database
enable_extension "btree_gin" enable_extension "btree_gin"
enable_extension "plpgsql" enable_extension "plpgsql"
@@ -177,6 +177,7 @@ ActiveRecord::Schema[8.0].define(version: 2025_06_15_091654) do
t.datetime "created_at", null: false t.datetime "created_at", null: false
t.index ["account_id", "event_datetime"], name: "index_email_events_on_account_id_and_event_datetime" t.index ["account_id", "event_datetime"], name: "index_email_events_on_account_id_and_event_datetime"
t.index ["email"], name: "index_email_events_on_email" t.index ["email"], name: "index_email_events_on_email"
t.index ["email"], name: "index_email_events_on_email_event_types", where: "((event_type)::text = ANY ((ARRAY['bounce'::character varying, 'soft_bounce'::character varying, 'complaint'::character varying, 'soft_complaint'::character varying])::text[]))"
t.index ["emailable_type", "emailable_id"], name: "index_email_events_on_emailable" t.index ["emailable_type", "emailable_id"], name: "index_email_events_on_emailable"
t.index ["message_id"], name: "index_email_events_on_message_id" t.index ["message_id"], name: "index_email_events_on_message_id"
end end
@@ -304,6 +305,8 @@ ActiveRecord::Schema[8.0].define(version: 2025_06_15_091654) do
t.datetime "expire_at" t.datetime "expire_at"
t.text "name" t.text "name"
t.index ["account_id", "id"], name: "index_submissions_on_account_id_and_id" t.index ["account_id", "id"], name: "index_submissions_on_account_id_and_id"
t.index ["account_id", "template_id", "id"], name: "index_submissions_on_account_id_and_template_id_and_id", where: "(archived_at IS NULL)"
t.index ["account_id", "template_id", "id"], name: "index_submissions_on_account_id_and_template_id_and_id_archived", where: "(archived_at IS NOT NULL)"
t.index ["created_by_user_id"], name: "index_submissions_on_created_by_user_id" t.index ["created_by_user_id"], name: "index_submissions_on_created_by_user_id"
t.index ["slug"], name: "index_submissions_on_slug", unique: true t.index ["slug"], name: "index_submissions_on_slug", unique: true
t.index ["template_id"], name: "index_submissions_on_template_id" t.index ["template_id"], name: "index_submissions_on_template_id"
@@ -383,6 +386,8 @@ ActiveRecord::Schema[8.0].define(version: 2025_06_15_091654) do
t.string "external_id" t.string "external_id"
t.text "preferences", null: false t.text "preferences", null: false
t.boolean "shared_link", default: false, null: false t.boolean "shared_link", default: false, null: false
t.index ["account_id", "folder_id", "id"], name: "index_templates_on_account_id_and_folder_id_and_id", where: "(archived_at IS NULL)"
t.index ["account_id", "id"], name: "index_templates_on_account_id_and_id_archived", where: "(archived_at IS NOT NULL)"
t.index ["account_id"], name: "index_templates_on_account_id" t.index ["account_id"], name: "index_templates_on_account_id"
t.index ["author_id"], name: "index_templates_on_author_id" t.index ["author_id"], name: "index_templates_on_author_id"
t.index ["external_id"], name: "index_templates_on_external_id" t.index ["external_id"], name: "index_templates_on_external_id"
+1203
View File
File diff suppressed because it is too large. Load diff
+1272
View File
File diff suppressed because it is too large. Load diff
+1200
View File
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
+1290
View File
File diff suppressed because it is too large. Load diff
+1266
View File
File diff suppressed because it is too large. Load diff
+1275
View File
File diff suppressed because it is too large. Load diff
+1275
View File
File diff suppressed because it is too large. Load diff
+1200
View File
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
+21 -1
View File
@@ -132,7 +132,27 @@ const token = jwt.sign({
"fieldTypes": { "fieldTypes": {
"type": "array", "type": "array",
"required": false, "required": false,
"description": "Field type names to be used in the form builder. All field types are used by default." "description": "Field type names to be used in the form builder. All field types are used by default.",
"enum": [
"heading",
"text",
"signature",
"initials",
"date",
"datenow",
"number",
"image",
"checkbox",
"multiple",
"file",
"radio",
"select",
"cells",
"stamp",
"payment",
"phone",
"verification"
]
}, },
"drawFieldType": { "drawFieldType": {
"type": "string", "type": "string",
+21 -1
View File
@@ -317,7 +317,27 @@
"type": "string", "type": "string",
"required": false, "required": false,
"description": "Comma separated field type names to be used in the form builder. All field types are used by default.", "description": "Comma separated field type names to be used in the form builder. All field types are used by default.",
"example": "text,date" "example": "text,date",
"enum": [
"heading",
"text",
"signature",
"initials",
"date",
"datenow",
"number",
"image",
"checkbox",
"multiple",
"file",
"radio",
"select",
"cells",
"stamp",
"payment",
"phone",
"verification"
]
}, },
"data-draw-field-type": { "data-draw-field-type": {
"type": "string", "type": "string",
+21 -1
View File
@@ -123,7 +123,27 @@ const token = jwt.sign({
"fieldTypes": { "fieldTypes": {
"type": "array", "type": "array",
"required": false, "required": false,
"description": "Field type names to be used in the form builder. All field types are used by default." "description": "Field type names to be used in the form builder. All field types are used by default.",
"enum": [
"heading",
"text",
"signature",
"initials",
"date",
"datenow",
"number",
"image",
"checkbox",
"multiple",
"file",
"radio",
"select",
"cells",
"stamp",
"payment",
"phone",
"verification"
]
}, },
"drawFieldType": { "drawFieldType": {
"type": "string", "type": "string",
+21 -1
View File
@@ -144,7 +144,27 @@ const token = jwt.sign({
"field-types": { "field-types": {
"type": "array", "type": "array",
"required": false, "required": false,
"description": "Field type names to be used in the form builder. All field types are used by default." "description": "Field type names to be used in the form builder. All field types are used by default.",
"enum": [
"heading",
"text",
"signature",
"initials",
"date",
"datenow",
"number",
"image",
"checkbox",
"multiple",
"file",
"radio",
"select",
"cells",
"stamp",
"payment",
"phone",
"verification"
]
}, },
"draw-field-type": { "draw-field-type": {
"type": "string", "type": "string",
+40 -11
View File
@@ -48,6 +48,41 @@ export class AppComponent {}
"description": "The role name or title of the signer.", "description": "The role name or title of the signer.",
"example": "First Party" "example": "First Party"
}, },
"token": {
"type": "string",
"doc_type": "object",
"description": "JSON Web Token (JWT HS256) with a payload signed using the API key. <b>JWT can be generated only on the backend.</b>.",
"required": false,
"properties": {
"slug": {
"type": "string",
"required": true,
"description": "Template or Submitter slug. When Submitter slug is used no need to pass additional email param."
},
"email": {
"type": "string",
"required": false,
"description": "Email address of the signer. Additional email form step will be displayed if the email attribute is not specified with Template slug."
},
"external_id": {
"type": "string",
"required": false,
"description": "Your application-specific unique string key to identify signer within your app."
},
"preview": {
"type": "boolean",
"required": false,
"default": false,
"description": "Show form in preview mode without ability to submit it."
}
}
},
"preview": {
"type": "boolean",
"required": false,
"default": false,
"description": "Show form in preview mode without ability to submit it. Completed documents embedded in preview mode require `data-token` authentication."
},
"expand": { "expand": {
"type": "boolean", "type": "boolean",
"required": false, "required": false,
@@ -66,11 +101,6 @@ export class AppComponent {}
"default": false, "default": false,
"description": "Order form fields based on their position on the pages." "description": "Order form fields based on their position on the pages."
}, },
"externalId": {
"type": "string",
"required": false,
"description": "Your application-specific unique string key to identify signer within your app."
},
"logo": { "logo": {
"type": "string", "type": "string",
"required": false, "required": false,
@@ -87,12 +117,6 @@ export class AppComponent {}
"default": "{}", "default": "{}",
"description": "Object that contains i18n keys to replace the default UI text with custom values. See <a href=\"https://github.com/docusealco/docuseal/blob/master/app/javascript/submission_form/i18n.js\" class=\"link\" target=\"_blank\" rel=\"nofollow\">submission_form/i18n.js</a> for available i18n keys." "description": "Object that contains i18n keys to replace the default UI text with custom values. See <a href=\"https://github.com/docusealco/docuseal/blob/master/app/javascript/submission_form/i18n.js\" class=\"link\" target=\"_blank\" rel=\"nofollow\">submission_form/i18n.js</a> for available i18n keys."
}, },
"preview": {
"type": "boolean",
"required": false,
"default": false,
"description": "Show form in preview mode without ability to submit it."
},
"goToLast": { "goToLast": {
"type": "boolean", "type": "boolean",
"required": false, "required": false,
@@ -242,6 +266,11 @@ export class AppComponent {}
"description": "Pre-assigned values for form fields.", "description": "Pre-assigned values for form fields.",
"example": "{ 'First Name': 'Jon', 'Last Name': 'Doe' }" "example": "{ 'First Name': 'Jon', 'Last Name': 'Doe' }"
}, },
"externalId": {
"type": "string",
"required": false,
"description": "Your application-specific unique string key to identify signer within your app."
},
"metadata": { "metadata": {
"type": "object", "type": "object",
"required": false, "required": false,
+35 -6
View File
@@ -42,6 +42,41 @@
"description": "The role name or title of the signer.", "description": "The role name or title of the signer.",
"example": "First Party" "example": "First Party"
}, },
"data-token": {
"type": "string",
"doc_type": "object",
"description": "JSON Web Token (JWT HS256) with a payload signed using the API key. <b>JWT can be generated only on the backend.</b>.",
"required": false,
"properties": {
"slug": {
"type": "string",
"required": true,
"description": "Template or Submitter slug. When Submitter slug is used no need to pass additional email param."
},
"email": {
"type": "string",
"required": false,
"description": "Email address of the signer. Additional email form step will be displayed if the email attribute is not specified with Template slug."
},
"external_id": {
"type": "string",
"required": false,
"description": "Your application-specific unique string key to identify signer within your app."
},
"preview": {
"type": "boolean",
"required": false,
"default": false,
"description": "Show form in preview mode without ability to submit it."
}
}
},
"data-preview": {
"type": "boolean",
"required": false,
"default": false,
"description": "Show form in preview mode without ability to submit it. Completed documents embedded in preview mode require `data-token` authentication."
},
"data-expand": { "data-expand": {
"type": "boolean", "type": "boolean",
"required": false, "required": false,
@@ -60,12 +95,6 @@
"default": false, "default": false,
"description": "Order form fields based on their position on the pages." "description": "Order form fields based on their position on the pages."
}, },
"data-preview": {
"type": "boolean",
"required": false,
"default": false,
"description": "Show form in preview mode without ability to submit it."
},
"data-logo": { "data-logo": {
"type": "string", "type": "string",
"required": false, "required": false,
+40 -11
View File
@@ -45,6 +45,41 @@ export function App() {
"description": "The role name or title of the signer.", "description": "The role name or title of the signer.",
"example": "First Party" "example": "First Party"
}, },
"token": {
"type": "string",
"doc_type": "object",
"description": "JSON Web Token (JWT HS256) with a payload signed using the API key. <b>JWT can be generated only on the backend.</b>.",
"required": false,
"properties": {
"slug": {
"type": "string",
"required": true,
"description": "Template or Submitter slug. When Submitter slug is used no need to pass additional email param."
},
"email": {
"type": "string",
"required": false,
"description": "Email address of the signer. Additional email form step will be displayed if the email attribute is not specified with Template slug."
},
"external_id": {
"type": "string",
"required": false,
"description": "Your application-specific unique string key to identify signer within your app."
},
"preview": {
"type": "boolean",
"required": false,
"default": false,
"description": "Show form in preview mode without ability to submit it."
}
}
},
"preview": {
"type": "boolean",
"required": false,
"default": false,
"description": "Show form in preview mode without ability to submit it. Completed documents embedded in preview mode require `token` authentication."
},
"expand": { "expand": {
"type": "boolean", "type": "boolean",
"required": false, "required": false,
@@ -63,11 +98,6 @@ export function App() {
"default": false, "default": false,
"description": "Order form fields based on their position on the pages." "description": "Order form fields based on their position on the pages."
}, },
"externalId": {
"type": "string",
"required": false,
"description": "Your application-specific unique string key to identify signer within your app."
},
"logo": { "logo": {
"type": "string", "type": "string",
"required": false, "required": false,
@@ -84,12 +114,6 @@ export function App() {
"default": "{}", "default": "{}",
"description": "Object that contains i18n keys to replace the default UI text with custom values. See <a href=\"https://github.com/docusealco/docuseal/blob/master/app/javascript/submission_form/i18n.js\" class=\"link\" target=\"_blank\" rel=\"nofollow\">submission_form/i18n.js</a> for available i18n keys." "description": "Object that contains i18n keys to replace the default UI text with custom values. See <a href=\"https://github.com/docusealco/docuseal/blob/master/app/javascript/submission_form/i18n.js\" class=\"link\" target=\"_blank\" rel=\"nofollow\">submission_form/i18n.js</a> for available i18n keys."
}, },
"preview": {
"type": "boolean",
"required": false,
"default": false,
"description": "Show form in preview mode without ability to submit it."
},
"goToLast": { "goToLast": {
"type": "boolean", "type": "boolean",
"required": false, "required": false,
@@ -239,6 +263,11 @@ export function App() {
"description": "Pre-assigned values for form fields.", "description": "Pre-assigned values for form fields.",
"example": "{ 'First Name': 'Jon', 'Last Name': 'Doe' }" "example": "{ 'First Name': 'Jon', 'Last Name': 'Doe' }"
}, },
"externalId": {
"type": "string",
"required": false,
"description": "Your application-specific unique string key to identify signer within your app."
},
"metadata": { "metadata": {
"type": "object", "type": "object",
"required": false, "required": false,
+36 -7
View File
@@ -54,11 +54,41 @@ export default {
"description": "The role name or title of the signer.", "description": "The role name or title of the signer.",
"example": "First Party" "example": "First Party"
}, },
"external-id": { "token": {
"type": "string",
"doc_type": "object",
"description": "JSON Web Token (JWT HS256) with a payload signed using the API key. <b>JWT can be generated only on the backend.</b>.",
"required": false,
"properties": {
"slug": {
"type": "string",
"required": true,
"description": "Template or Submitter slug. When Submitter slug is used no need to pass additional email param."
},
"email": {
"type": "string",
"required": false,
"description": "Email address of the signer. Additional email form step will be displayed if the email attribute is not specified with Template slug."
},
"external_id": {
"type": "string", "type": "string",
"required": false, "required": false,
"description": "Your application-specific unique string key to identify signer within your app." "description": "Your application-specific unique string key to identify signer within your app."
}, },
"preview": {
"type": "boolean",
"required": false,
"default": false,
"description": "Show form in preview mode without ability to submit it."
}
}
},
"preview": {
"type": "boolean",
"required": false,
"default": false,
"description": "Show form in preview mode without ability to submit it. Completed documents embedded in preview mode require `data-token` authentication."
},
"expand": { "expand": {
"type": "boolean", "type": "boolean",
"required": false, "required": false,
@@ -93,12 +123,6 @@ export default {
"default": "{}", "default": "{}",
"description": "Object that contains i18n keys to replace the default UI text with custom values. See <a href=\"https://github.com/docusealco/docuseal/blob/master/app/javascript/submission_form/i18n.js\" class=\"link\" target=\"_blank\" rel=\"nofollow\">submission_form/i18n.js</a> for available i18n keys." "description": "Object that contains i18n keys to replace the default UI text with custom values. See <a href=\"https://github.com/docusealco/docuseal/blob/master/app/javascript/submission_form/i18n.js\" class=\"link\" target=\"_blank\" rel=\"nofollow\">submission_form/i18n.js</a> for available i18n keys."
}, },
"preview": {
"type": "boolean",
"required": false,
"default": false,
"description": "Show form in preview mode without ability to submit it."
},
"go-to-last": { "go-to-last": {
"type": "boolean", "type": "boolean",
"required": false, "required": false,
@@ -249,6 +273,11 @@ export default {
"description": "Pre-assigned values for form fields.", "description": "Pre-assigned values for form fields.",
"example": "{ 'First Name': 'Jon', 'Last Name': 'Doe' }" "example": "{ 'First Name': 'Jon', 'Last Name': 'Doe' }"
}, },
"external-id": {
"type": "string",
"required": false,
"description": "Your application-specific unique string key to identify signer within your app."
},
"metadata": { "metadata": {
"type": "object", "type": "object",
"required": false, "required": false,
+1839 -12
View File
File diff suppressed because it is too large. Load diff
+1 -1
View File
@@ -13,7 +13,7 @@ module Abilities
TemplateSharing.where({ ability:, account_id: [user.account_id, TemplateSharing::ALL_ID] }.compact) TemplateSharing.where({ ability:, account_id: [user.account_id, TemplateSharing::ALL_ID] }.compact)
.select(:template_id) .select(:template_id)
Template.where(Template.arel_table[:id].in(Arel::Nodes::Union.new(templates.select(:id).arel, shared_ids.arel))) Template.where(Template.arel_table[:id].in(templates.select(:id).arel.union(shared_ids.arel)))
end end
def entity(template, user:, ability: nil) def entity(template, user:, ability: nil)
+7 -4
View File
@@ -73,13 +73,16 @@ module Docuseal
@default_pkcs ||= GenerateCertificate.load_pkcs(Docuseal::CERTS) @default_pkcs ||= GenerateCertificate.load_pkcs(Docuseal::CERTS)
end end
def fulltext_search?(_user) def fulltext_search?
return false unless SearchEntry.table_exists? return @fulltext_search unless @fulltext_search.nil?
return true if Docuseal.multitenant?
return true if Rails.env.local?
@fulltext_search =
if SearchEntry.table_exists?
Docuseal.multitenant? ? true : AccountConfig.exists?(key: :fulltext_search, value: true)
else
false false
end end
end
def enable_pwa? def enable_pwa?
true true
+15
View File
@@ -0,0 +1,15 @@
# frozen_string_literal: true
module ImageUtils
module_function
def blank?(image)
min = (0...image.bands).map { |i| image.stats.getpoint(0, i)[0] }
max = (0...image.bands).map { |i| image.stats.getpoint(1, i)[0] }
return true if min.all?(255) && max.all?(255)
return true if min.all?(0) && max.all?(0)
false
end
end
+3 -2
View File
@@ -2,11 +2,12 @@
module MarkdownToHtml module MarkdownToHtml
LINK_REGEXP = %r{\[([^\]]+)\]\((https?://[^)]+)\)} LINK_REGEXP = %r{\[([^\]]+)\]\((https?://[^)]+)\)}
LINK_REPLACE = '<a href="\2">\1</a>'
module_function module_function
def call(text) def call(text)
text.gsub(LINK_REGEXP, LINK_REPLACE) text.gsub(LINK_REGEXP) do
ApplicationController.helpers.link_to(Regexp.last_match(1), Regexp.last_match(2))
end
end end
end end
+40 -4
View File
@@ -24,6 +24,7 @@ class Pdfium
typedef :pointer, :FPDF_PAGE typedef :pointer, :FPDF_PAGE
typedef :pointer, :FPDF_BITMAP typedef :pointer, :FPDF_BITMAP
typedef :pointer, :FPDF_FORMHANDLE typedef :pointer, :FPDF_FORMHANDLE
typedef :pointer, :FPDF_TEXTPAGE
MAX_SIZE = 32_767 MAX_SIZE = 32_767
@@ -72,6 +73,11 @@ class Pdfium
attach_function :FPDF_RenderPageBitmap, %i[FPDF_BITMAP FPDF_PAGE int int int int int int], :void attach_function :FPDF_RenderPageBitmap, %i[FPDF_BITMAP FPDF_PAGE int int int int int int], :void
attach_function :FPDFText_LoadPage, [:FPDF_PAGE], :FPDF_TEXTPAGE
attach_function :FPDFText_ClosePage, [:FPDF_TEXTPAGE], :void
attach_function :FPDFText_CountChars, [:FPDF_TEXTPAGE], :int
attach_function :FPDFText_GetText, %i[FPDF_TEXTPAGE int int pointer], :int
typedef :int, :FPDF_BOOL typedef :int, :FPDF_BOOL
typedef :pointer, :IPDF_JSPLATFORM typedef :pointer, :IPDF_JSPLATFORM
@@ -332,12 +338,8 @@ class Pdfium
Pdfium.FPDF_RenderPageBitmap(bitmap_ptr, page_ptr, 0, 0, render_width, render_height, 0, flags) Pdfium.FPDF_RenderPageBitmap(bitmap_ptr, page_ptr, 0, 0, render_width, render_height, 0, flags)
Pdfium.check_last_error('Failed to render page to bitmap')
unless form_handle.null? unless form_handle.null?
Pdfium.FPDF_FFLDraw(form_handle, bitmap_ptr, page_ptr, 0, 0, render_width, render_height, 0, flags) Pdfium.FPDF_FFLDraw(form_handle, bitmap_ptr, page_ptr, 0, 0, render_width, render_height, 0, flags)
Pdfium.check_last_error('Call to FPDF_FFLDraw completed (check for rendering issues if any)')
end end
buffer_ptr = Pdfium.FPDFBitmap_GetBuffer(bitmap_ptr) buffer_ptr = Pdfium.FPDFBitmap_GetBuffer(bitmap_ptr)
@@ -350,6 +352,40 @@ class Pdfium
Pdfium.FPDFBitmap_Destroy(bitmap_ptr) if bitmap_ptr && !bitmap_ptr.null? Pdfium.FPDFBitmap_Destroy(bitmap_ptr) if bitmap_ptr && !bitmap_ptr.null?
end end
def text
return @text if @text
ensure_not_closed!
text_page = Pdfium.FPDFText_LoadPage(page_ptr)
if text_page.null?
Pdfium.check_last_error("Failed to load text page #{page_index}")
raise PdfiumError, "Failed to load text page #{page_index}, pointer is NULL."
end
char_count = Pdfium.FPDFText_CountChars(text_page)
return @text = '' if char_count.zero?
buffer_char_capacity = char_count + 1
buffer = FFI::MemoryPointer.new(:uint16, buffer_char_capacity)
chars_written = Pdfium.FPDFText_GetText(text_page, 0, buffer_char_capacity, buffer)
if chars_written <= 0
Pdfium.check_last_error("Failed to extract text from page #{page_index}")
return @text = ''
end
@text = buffer.read_bytes((chars_written * 2) - 2).force_encoding('UTF-16LE').encode('UTF-8')
ensure
Pdfium.FPDFText_ClosePage(text_page) if text_page && !text_page.null?
end
def close def close
return if closed? return if closed?
+21 -9
View File
@@ -56,7 +56,7 @@ module SearchEntries
end end
[sql, number, number.length > 1 ? number.delete_prefix('0') : number, keyword] [sql, number, number.length > 1 ? number.delete_prefix('0') : number, keyword]
elsif keyword.match?(/[^\p{L}\d&@._\-+]/) || keyword.match?(/\A['"].*['"]\z/) elsif keyword.match?(/[^\p{L}\d&@.\-]/) || keyword.match?(/\A['"].*['"]\z/)
['tsvector @@ plainto_tsquery(?)', TextUtils.transliterate(keyword.downcase)] ['tsvector @@ plainto_tsquery(?)', TextUtils.transliterate(keyword.downcase)]
else else
keyword = TextUtils.transliterate(keyword.downcase).squish keyword = TextUtils.transliterate(keyword.downcase).squish
@@ -180,15 +180,21 @@ module SearchEntries
end end
def index_template(template) def index_template(template)
sql = SearchEntry.sanitize_sql_array( text = TextUtils.transliterate(template.name.to_s.downcase.squish).delete("\0")
["SELECT to_tsvector(:text), to_tsvector('simple', :text)",
{ text: TextUtils.transliterate(template.name.to_s.downcase).delete("\0") }] sql = SearchEntry.sanitize_sql_array(["SELECT to_tsvector(:text), to_tsvector('simple', :text)", { text: }])
)
entry = template.search_entry || template.build_search_entry entry = template.search_entry || template.build_search_entry
entry.account_id = template.account_id entry.account_id = template.account_id
entry.tsvector, ngram = SearchEntry.connection.select_rows(sql).first entry.tsvector, ngram = SearchEntry.connection.select_rows(sql).first
hyphens = text.scan(/\b[^\s]*?\d-[^\s]+?\b/) + text.scan(/\b[^\s]+-\d[^\s]*?\b/)
hyphens.uniq.each_with_index do |item, index|
entry.tsvector += " '#{item.delete("'")}':#{index + 1}" unless entry.tsvector.include?(item)
end
entry.ngram = build_ngram(ngram) entry.ngram = build_ngram(ngram)
return if entry.tsvector.blank? return if entry.tsvector.blank?
@@ -205,15 +211,21 @@ module SearchEntries
def index_submission(submission) def index_submission(submission)
return if submission.name.blank? return if submission.name.blank?
sql = SearchEntry.sanitize_sql_array( text = TextUtils.transliterate(submission.name.to_s.downcase.squish).delete("\0")
["SELECT to_tsvector(:text), to_tsvector('simple', :text)",
{ text: TextUtils.transliterate(submission.name.to_s.downcase).delete("\0") }] sql = SearchEntry.sanitize_sql_array(["SELECT to_tsvector(:text), to_tsvector('simple', :text)", { text: }])
)
entry = submission.search_entry || submission.build_search_entry entry = submission.search_entry || submission.build_search_entry
entry.account_id = submission.account_id entry.account_id = submission.account_id
entry.tsvector, ngram = SearchEntry.connection.select_rows(sql).first entry.tsvector, ngram = SearchEntry.connection.select_rows(sql).first
hyphens = text.scan(/\b[^\s]*?\d-[^\s]+?\b/) + text.scan(/\b[^\s]+-\d[^\s]*?\b/)
hyphens.uniq.each_with_index do |item, index|
entry.tsvector += " '#{item.delete("'")}':#{index + 1}" unless entry.tsvector.include?(item)
end
entry.ngram = build_ngram(ngram) entry.ngram = build_ngram(ngram)
return if entry.tsvector.blank? return if entry.tsvector.blank?
+3 -2
View File
@@ -8,7 +8,7 @@ module Submissions
module_function module_function
def search(current_user, submissions, keyword, search_values: false, search_template: false) def search(current_user, submissions, keyword, search_values: false, search_template: false)
if Docuseal.fulltext_search?(current_user) if Docuseal.fulltext_search?
fulltext_search(current_user, submissions, keyword, search_template:) fulltext_search(current_user, submissions, keyword, search_template:)
else else
plain_search(submissions, keyword, search_values:, search_template:) plain_search(submissions, keyword, search_values:, search_template:)
@@ -50,7 +50,8 @@ module Submissions
arel, arel,
Submission.where( Submission.where(
template_id: SearchEntry.where(record_type: 'Template') template_id: SearchEntry.where(record_type: 'Template')
.where(account_id: current_user.account_id) .where(account_id: [current_user.account_id,
current_user.account.linked_account_account&.account_id].compact)
.where(*SearchEntries.build_tsquery(keyword)) .where(*SearchEntries.build_tsquery(keyword))
.select(:record_id) .select(:record_id)
).select(:id).arel ).select(:id).arel
@@ -195,6 +195,8 @@ module Submissions
merged_submitter['uuid'] = new_uuid merged_submitter['uuid'] = new_uuid
merged_submitter['name'] = name merged_submitter['name'] = name
merged_submitter.delete('linked_to_uuid') merged_submitter.delete('linked_to_uuid')
next merged_submitter
end end
submitter submitter
+4 -3
View File
@@ -312,8 +312,9 @@ module Submissions
text_align: field_name.to_s.match?(RTL_REGEXP) ? :right : :left, text_align: field_name.to_s.match?(RTL_REGEXP) ? :right : :left,
line_spacing: 1.3, padding: [0, 0, 2, 0] line_spacing: 1.3, padding: [0, 0, 2, 0]
), ),
if field['type'].in?(%w[image signature initials stamp]) if field['type'].in?(%w[image signature initials stamp]) &&
attachment = submitter.attachments.find { |a| a.uuid == value } (attachment = submitter.attachments.find { |a| a.uuid == value }) &&
attachment.image?
image = image =
begin begin
@@ -340,7 +341,7 @@ module Submissions
composer.image(io, width:, height:, margin: [5, 0, 10, 0]) composer.image(io, width:, height:, margin: [5, 0, 10, 0])
composer.formatted_text_box([{ text: '' }]) composer.formatted_text_box([{ text: '' }])
elsif field['type'].in?(%w[file payment]) elsif field['type'].in?(%w[file payment image])
if field['type'] == 'payment' if field['type'] == 'payment'
unit = CURRENCY_SYMBOLS[field['preferences']['currency']] || field['preferences']['currency'] unit = CURRENCY_SYMBOLS[field['preferences']['currency']] || field['preferences']['currency']
+15 -3
View File
@@ -223,7 +223,7 @@ module Submissions
font_name = FONT_NAME unless font_name.in?(DEFAULT_FONTS) font_name = FONT_NAME unless font_name.in?(DEFAULT_FONTS)
if font_variant != :none && font_name == FONT_NAME if font_variant != :none && font_name == FONT_NAME
font_name = FONT_VARIANS[font_variant] font_name = FONT_VARIANS[font_variant] if FONT_VARIANS[font_variant]
font_variant = nil unless font_name.in?(DEFAULT_FONTS) font_variant = nil unless font_name.in?(DEFAULT_FONTS)
end end
@@ -252,11 +252,23 @@ module Submissions
canvas = page.canvas(type: :overlay) canvas = page.canvas(type: :overlay)
canvas.font(FONT_NAME, size: font_size) canvas.font(FONT_NAME, size: font_size)
case field['type'] field_type = field['type']
field_type = 'file' if field_type == 'image' &&
!submitter.attachments.find { |a| a.uuid == value }.image?
case field_type
when ->(type) { type == 'signature' && (with_signature_id || field.dig('preferences', 'reason_field_uuid')) } when ->(type) { type == 'signature' && (with_signature_id || field.dig('preferences', 'reason_field_uuid')) }
attachment = submitter.attachments.find { |a| a.uuid == value } attachment = submitter.attachments.find { |a| a.uuid == value }
image = load_vips_image(attachment, attachments_data_cache).autorot image =
begin
load_vips_image(attachment, attachments_data_cache).autorot
rescue Vips::Error
next unless attachment.content_type.starts_with?('image/')
next if attachment.byte_size.zero?
raise
end
reason_value = submitter.values[field.dig('preferences', 'reason_field_uuid')].presence reason_value = submitter.values[field.dig('preferences', 'reason_field_uuid')].presence
+7 -7
View File
@@ -36,18 +36,18 @@ module Submissions
last_submitter = submitters.max_by(&:completed_at) last_submitter = submitters.max_by(&:completed_at)
if with_documents if with_documents
json[:documents] = serialized_submitters.find { |e| e['id'] == last_submitter.id }['documents'] json['documents'] = serialized_submitters.find { |e| e['id'] == last_submitter.id }['documents']
end end
json[:status] = 'completed' json['status'] = 'completed'
json[:completed_at] = last_submitter.completed_at json['completed_at'] = last_submitter.completed_at
else else
json[:documents] = [] if with_documents json['documents'] = [] if with_documents
json[:status] = build_status(submission, submitters) json['status'] = build_status(submission, submitters)
json[:completed_at] = nil json['completed_at'] = nil
end end
json[:submitters] = serialized_submitters json['submitters'] = serialized_submitters
json json
end end
+10 -8
View File
@@ -14,7 +14,7 @@ module Submitters
module_function module_function
def search(current_user, submitters, keyword) def search(current_user, submitters, keyword)
if Docuseal.fulltext_search?(current_user) if Docuseal.fulltext_search?
fulltext_search(current_user, submitters, keyword) fulltext_search(current_user, submitters, keyword)
else else
plain_search(submitters, keyword) plain_search(submitters, keyword)
@@ -35,11 +35,11 @@ module Submitters
def fulltext_search_field(current_user, submitters, keyword, field_name) def fulltext_search_field(current_user, submitters, keyword, field_name)
keyword = keyword.delete("\0") keyword = keyword.delete("\0")
return submitters if keyword.blank? return submitters.none if keyword.blank?
weight = FIELD_NAME_WEIGHTS[field_name] weight = FIELD_NAME_WEIGHTS[field_name]
return submitters if weight.blank? return submitters.none if weight.blank?
query = query =
if keyword.match?(/\d/) && !keyword.match?(/\p{L}/) if keyword.match?(/\d/) && !keyword.match?(/\p{L}/)
@@ -53,7 +53,7 @@ module Submitters
end end
[sql, number, weight, number.length > 1 ? number.delete_prefix('0') : number, weight] [sql, number, weight, number.length > 1 ? number.delete_prefix('0') : number, weight]
elsif keyword.match?(/[^\p{L}\d&@._\-+]/) elsif keyword.match?(/[^\p{L}\d&@.\-]/)
terms = TextUtils.transliterate(keyword.downcase).split(/\b/).map(&:squish).compact_blank.uniq terms = TextUtils.transliterate(keyword.downcase).split(/\b/).map(&:squish).compact_blank.uniq
if terms.size > 1 if terms.size > 1
@@ -65,12 +65,13 @@ module Submitters
SearchEntries.build_weights_wildcard_tsquery(keyword, weight) SearchEntries.build_weights_wildcard_tsquery(keyword, weight)
end end
submitters.where( submitter_ids = SearchEntry.where(record_type: 'Submitter')
id: SearchEntry.where(record_type: 'Submitter')
.where(account_id: current_user.account_id) .where(account_id: current_user.account_id)
.where(*query) .where(*query)
.select(:record_id) .limit(500)
) .pluck(:record_id)
submitters.where(id: submitter_ids.first(100))
end end
def plain_search(submitters, keyword) def plain_search(submitters, keyword)
@@ -134,6 +135,7 @@ module Submitters
preferences['email_message_uuid'] = email_message.uuid if email_message preferences['email_message_uuid'] = email_message.uuid if email_message
preferences['send_email'] = params['send_email'].in?(TRUE_VALUES) if params.key?('send_email') preferences['send_email'] = params['send_email'].in?(TRUE_VALUES) if params.key?('send_email')
preferences['send_sms'] = params['send_sms'].in?(TRUE_VALUES) if params.key?('send_sms') preferences['send_sms'] = params['send_sms'].in?(TRUE_VALUES) if params.key?('send_sms')
preferences['require_phone_2fa'] = params['require_phone_2fa'].in?(TRUE_VALUES) if params.key?('require_phone_2fa')
preferences['bcc_completed'] = params['bcc_completed'] if params.key?('bcc_completed') preferences['bcc_completed'] = params['bcc_completed'] if params.key?('bcc_completed')
preferences['reply_to'] = params['reply_to'] if params.key?('reply_to') preferences['reply_to'] = params['reply_to'] if params.key?('reply_to')
preferences['go_to_last'] = params['go_to_last'] if params.key?('go_to_last') preferences['go_to_last'] = params['go_to_last'] if params.key?('go_to_last')
@@ -7,6 +7,8 @@ module Submitters
module_function module_function
def call(submitter, params, cookies = nil, attachments = []) def call(submitter, params, cookies = nil, attachments = [])
attachments = attachments.select { |e| e.record_id == submitter.id && e.record_type == 'Submitter' }
if (value = params[:signature_src].presence || params[:signature].presence) if (value = params[:signature_src].presence || params[:signature].presence)
find_or_create_signature_from_value(submitter, value, attachments) find_or_create_signature_from_value(submitter, value, attachments)
elsif params[:signed_signature_uuids].present? elsif params[:signed_signature_uuids].present?
+7 -4
View File
@@ -219,8 +219,7 @@ module Submitters
submitters_values = nil submitters_values = nil
has_other_submitters = submission.template_submitters.size > 1 has_other_submitters = submission.template_submitters.size > 1
has_document_conditions = has_document_conditions = submission_has_document_conditions?(submission)
(submission.template_schema || submission.template.schema).any? { |e| e['conditions'].present? }
attachments_index = attachments_index =
if has_document_conditions if has_document_conditions
@@ -234,7 +233,7 @@ module Submitters
if has_document_conditions && !check_field_areas_attachments(field, attachments_index) if has_document_conditions && !check_field_areas_attachments(field, attachments_index)
submitter.values.delete(field['uuid']) submitter.values.delete(field['uuid'])
required_field_uuids_acc.delete(field['uuid']) required_field_uuids_acc&.delete(field['uuid'])
end end
if has_other_submitters && !submitters_values && if has_other_submitters && !submitters_values &&
@@ -244,13 +243,17 @@ module Submitters
unless check_field_conditions(submitters_values || submitter.values, field, submission.fields_uuid_index) unless check_field_conditions(submitters_values || submitter.values, field, submission.fields_uuid_index)
submitter.values.delete(field['uuid']) submitter.values.delete(field['uuid'])
required_field_uuids_acc.delete(field['uuid']) required_field_uuids_acc&.delete(field['uuid'])
end end
end end
submitter.values submitter.values
end end
def submission_has_document_conditions?(submission)
(submission.template_schema || submission.template.schema).any? { |e| e['conditions'].present? }
end
def required_editable_field?(field) def required_editable_field?(field)
return false if NONEDITABLE_FIELD_TYPES.include?(field['type']) return false if NONEDITABLE_FIELD_TYPES.include?(field['type'])
+3 -2
View File
@@ -38,7 +38,7 @@ module Templates
end end
def search(current_user, templates, keyword) def search(current_user, templates, keyword)
if Docuseal.fulltext_search?(current_user) if Docuseal.fulltext_search?
fulltext_search(current_user, templates, keyword) fulltext_search(current_user, templates, keyword)
else else
plain_search(templates, keyword) plain_search(templates, keyword)
@@ -56,7 +56,8 @@ module Templates
templates.where( templates.where(
id: SearchEntry.where(record_type: 'Template') id: SearchEntry.where(record_type: 'Template')
.where(account_id: current_user.account_id) .where(account_id: [current_user.account_id,
current_user.account.linked_account_account&.account_id].compact)
.where(*SearchEntries.build_tsquery(keyword)) .where(*SearchEntries.build_tsquery(keyword))
.select(:record_id) .select(:record_id)
) )
+2 -2
View File
@@ -69,7 +69,7 @@ module Templates
bitdepth = 2**image.stats.to_a[1..3].pluck(2).uniq.size bitdepth = 2**image.stats.to_a[1..3].pluck(2).uniq.size
io = StringIO.new(image.write_to_buffer(FORMAT, compression: 7, filter: 0, bitdepth:, io = StringIO.new(image.write_to_buffer(FORMAT, compression: 7, filter: 0, bitdepth:,
palette: true, Q: bitdepth == 8 ? Q : 5, dither: 0)) palette: true, Q: Q, dither: 0))
ActiveStorage::Attachment.create!( ActiveStorage::Attachment.create!(
blob: ActiveStorage::Blob.create_and_upload!( blob: ActiveStorage::Blob.create_and_upload!(
@@ -141,7 +141,7 @@ module Templates
bitdepth = 2**page.stats.to_a[1..3].pluck(2).uniq.size bitdepth = 2**page.stats.to_a[1..3].pluck(2).uniq.size
page.write_to_buffer(format, compression: 7, filter: 0, bitdepth:, page.write_to_buffer(format, compression: 7, filter: 0, bitdepth:,
palette: true, Q: bitdepth == 8 ? Q : 5, dither: 0) palette: true, Q: Q, dither: 0)
else else
page.write_to_buffer(format, interlace: true, Q: JPEG_Q) page.write_to_buffer(format, interlace: true, Q: JPEG_Q)
end end
+2
View File
@@ -53,6 +53,8 @@ module TimeUtils
def format_date_string(string, format, locale) def format_date_string(string, format, locale)
date = Date.parse(string.to_s) date = Date.parse(string.to_s)
format = format.upcase if format
format ||= locale.to_s.ends_with?('US') ? DEFAULT_DATE_FORMAT_US : DEFAULT_DATE_FORMAT format ||= locale.to_s.ends_with?('US') ? DEFAULT_DATE_FORMAT_US : DEFAULT_DATE_FORMAT
i18n_format = format.sub(/D+/, DAY_FORMATS[format[/D+/]]) i18n_format = format.sub(/D+/, DAY_FORMATS[format[/D+/]])
+1 -1
View File
@@ -6,7 +6,7 @@
"@babel/plugin-transform-runtime": "7.21.4", "@babel/plugin-transform-runtime": "7.21.4",
"@babel/preset-env": "7.21.5", "@babel/preset-env": "7.21.5",
"@babel/runtime": "7.21.5", "@babel/runtime": "7.21.5",
"@eid-easy/eideasy-widget": "^2.132.1", "@eid-easy/eideasy-widget": "^2.159.0",
"@github/catalyst": "^2.0.0-beta", "@github/catalyst": "^2.0.0-beta",
"@hotwired/turbo": "https://github.com/docusealco/turbo#main", "@hotwired/turbo": "https://github.com/docusealco/turbo#main",
"@hotwired/turbo-rails": "^7.3.0", "@hotwired/turbo-rails": "^7.3.0",
+13
View File
@@ -49,5 +49,18 @@ RSpec.describe 'Dashboard Page' do
expect(page).to have_current_path(edit_template_path(Template.last), ignore_query: true) expect(page).to have_current_path(edit_template_path(Template.last), ignore_query: true)
end end
end end
it 'searches be submitter email' do
submission = create(:submission, :with_submitters, template: templates[0])
submitter = submission.submitters.first
SearchEntries.reindex_all
visit root_path(q: submitter.email)
expect(page).to have_content('Templates not Found')
expect(page).to have_content('Submissions')
expect(page).to have_content(submitter.name)
end
end end
end end
+182 -4
View File
@@ -9,18 +9,78 @@ RSpec.describe 'Signing Form' do
create(:template, shared_link: true, account:, author:, except_field_types: %w[phone payment stamp]) create(:template, shared_link: true, account:, author:, except_field_types: %w[phone payment stamp])
end end
before do it 'displays only the email step when only email is required' do
visit start_form_path(slug: template.slug) visit start_form_path(slug: template.slug)
end
it 'shows the email step' do
expect(page).to have_content('You have been invited to submit a form') expect(page).to have_content('You have been invited to submit a form')
expect(page).to have_content("Invited by #{account.name}") expect(page).to have_content("Invited by #{account.name}")
expect(page).to have_field('Email', type: 'email') expect(page).to have_field('Email', type: 'email', placeholder: 'Provide your email to start')
expect(page).not_to have_field('Phone', type: 'tel')
expect(page).not_to have_field('Name', type: 'text')
expect(page).to have_button('Start') expect(page).to have_button('Start')
end end
it 'displays name, email, and phone fields together when all are required' do
template.update(preferences: { link_form_fields: %w[email name phone] })
visit start_form_path(slug: template.slug)
expect(page).to have_content('You have been invited to submit a form')
expect(page).to have_content("Invited by #{account.name}")
expect(page).to have_field('Email', type: 'email', placeholder: 'Provide your email')
expect(page).to have_field('Name', type: 'text', placeholder: 'Provide your name')
expect(page).to have_field('Phone', type: 'tel', placeholder: 'Provide your phone in international format')
expect(page).to have_button('Start')
end
it 'displays only the name step when only name is required' do
template.update(preferences: { link_form_fields: %w[name] })
visit start_form_path(slug: template.slug)
expect(page).to have_content('You have been invited to submit a form')
expect(page).to have_content("Invited by #{account.name}")
expect(page).to have_field('Name', type: 'text', placeholder: 'Provide your name to start')
expect(page).not_to have_field('Phone', type: 'tel')
expect(page).not_to have_field('Email', type: 'email')
expect(page).to have_button('Start')
end
it 'displays only the phone step when only phone is required' do
template.update(preferences: { link_form_fields: %w[phone] })
visit start_form_path(slug: template.slug)
expect(page).to have_content('You have been invited to submit a form')
expect(page).to have_content("Invited by #{account.name}")
expect(page).to have_field('Phone', type: 'tel',
placeholder: 'Provide your phone in international format to start')
expect(page).not_to have_field('Name', type: 'text')
expect(page).not_to have_field('Email', type: 'email')
expect(page).to have_button('Start')
end
it 'prevents starting the form if phone is not in international format' do
template.update(preferences: { link_form_fields: %w[phone] })
visit start_form_path(slug: template.slug)
fill_in 'Phone', with: '12345'
expect { click_button 'Start' }.not_to(change { current_path })
end
it 'prevents starting the form if email is invali' do
visit start_form_path(slug: template.slug)
fill_in 'Email', with: 'invalid-email'
expect { click_button 'Start' }.not_to(change { current_path })
end
it 'completes the form' do it 'completes the form' do
visit start_form_path(slug: template.slug)
# Submit's email step # Submit's email step
fill_in 'Email', with: 'john.dou@example.com' fill_in 'Email', with: 'john.dou@example.com'
click_button 'Start' click_button 'Start'
@@ -100,6 +160,97 @@ RSpec.describe 'Signing Form' do
expect(field_value(submitter, 'Attachment')).to be_present expect(field_value(submitter, 'Attachment')).to be_present
expect(field_value(submitter, 'Cell code')).to eq '123' expect(field_value(submitter, 'Cell code')).to eq '123'
end end
# rubocop:disable RSpec/ExampleLength
it 'completes the form when name, email, and phone are required' do
template.update(preferences: { link_form_fields: %w[email name phone] })
visit start_form_path(slug: template.slug)
# Submit's name, email, and phone step
fill_in 'Email', with: 'john.dou@example.com'
fill_in 'Name', with: 'John Doe'
fill_in 'Phone', with: '+17732298825'
click_button 'Start'
# Text step
fill_in 'First Name', with: 'John'
click_button 'next'
# Date step
fill_in 'Birthday', with: I18n.l(20.years.ago, format: '%Y-%m-%d')
click_button 'next'
# Checkbox step
check 'Do you agree?'
click_button 'next'
# Radio step
choose 'Boy'
click_button 'next'
# Signature step
draw_canvas
click_button 'next'
# Number step
fill_in 'House number', with: '123'
click_button 'next'
# Multiple choice step
%w[Red Blue].each { |color| check color }
click_button 'next'
# Select step
select 'Male', from: 'Gender'
click_button 'next'
# Initials step
draw_canvas
click_button 'next'
# Image step
find('#dropzone').click
find('input[type="file"]', visible: false).attach_file(Rails.root.join('spec/fixtures/sample-image.png'))
click_button 'next'
# File step
find('#dropzone').click
find('input[type="file"]', visible: false).attach_file(Rails.root.join('spec/fixtures/sample-document.pdf'))
click_button 'next'
# Cell step
fill_in 'Cell code', with: '123'
click_on 'Complete'
expect(page).to have_button('Download')
expect(page).to have_content('Document has been signed!')
submitter = template.submissions.last.submitters.last
expect(submitter.email).to eq('john.dou@example.com')
expect(submitter.name).to eq('John Doe')
expect(submitter.phone).to eq('+17732298825')
expect(submitter.ip).to eq('127.0.0.1')
expect(submitter.ua).to be_present
expect(submitter.opened_at).to be_present
expect(submitter.completed_at).to be_present
expect(submitter.declined_at).to be_nil
expect(field_value(submitter, 'First Name')).to eq 'John'
expect(field_value(submitter, 'Birthday')).to eq 20.years.ago.strftime('%Y-%m-%d')
expect(field_value(submitter, 'Do you agree?')).to be_truthy
expect(field_value(submitter, 'First child')).to eq 'Boy'
expect(field_value(submitter, 'Signature')).to be_present
expect(field_value(submitter, 'House number')).to eq 123
expect(field_value(submitter, 'Colors')).to contain_exactly('Red', 'Blue')
expect(field_value(submitter, 'Gender')).to eq 'Male'
expect(field_value(submitter, 'Initials')).to be_present
expect(field_value(submitter, 'Avatar')).to be_present
expect(field_value(submitter, 'Attachment')).to be_present
expect(field_value(submitter, 'Cell code')).to eq '123'
end
# rubocop:enable RSpec/ExampleLength
end end
context 'when the submitter form link is opened' do context 'when the submitter form link is opened' do
@@ -848,6 +999,33 @@ RSpec.describe 'Signing Form' do
end end
end end
context 'when the template shared link is disabled' do
let(:template) do
create(:template, shared_link: false, account:, author:, only_field_types: %w[text])
end
context 'when user is logged in' do
before do
login_as author
visit start_form_path(slug: template.slug)
end
it 'shows a warning that the shared link is disabled and provides an option to enable it' do
expect(page).to have_content('Share link is currently disabled')
expect(page).to have_content(template.name)
expect(page).to have_button('Enable shared link')
end
it 'enables the shared link' do
expect do
click_button 'Enable shared link'
end.to change { template.reload.shared_link }.from(false).to(true)
expect(page).to have_content('You have been invited to submit a form')
end
end
end
it 'sends completed email' do it 'sends completed email' do
template = create(:template, account:, author:, only_field_types: %w[text signature]) template = create(:template, account:, author:, only_field_types: %w[text signature])
submission = create(:submission, template:) submission = create(:submission, template:)
+14 -14
View File
@@ -1035,22 +1035,22 @@
resolved "https://registry.yarnpkg.com/@discoveryjs/json-ext/-/json-ext-0.5.7.tgz#1d572bfbbe14b7704e0ba0f39b74815b84870d70" resolved "https://registry.yarnpkg.com/@discoveryjs/json-ext/-/json-ext-0.5.7.tgz#1d572bfbbe14b7704e0ba0f39b74815b84870d70"
integrity sha512-dBVuXR082gk3jsFp7Rd/JI4kytwGHecnCoTtXFb7DB6CNHp4rg5k1bhg0nWdLGLnOV71lmDzGQaLMy8iPLY0pw== integrity sha512-dBVuXR082gk3jsFp7Rd/JI4kytwGHecnCoTtXFb7DB6CNHp4rg5k1bhg0nWdLGLnOV71lmDzGQaLMy8iPLY0pw==
"@eid-easy/eideasy-browser-client@2.104.1": "@eid-easy/eideasy-browser-client@2.124.0":
version "2.104.1" version "2.124.0"
resolved "https://registry.yarnpkg.com/@eid-easy/eideasy-browser-client/-/eideasy-browser-client-2.104.1.tgz#e492e0fc8ef1ff470c66522d530d5636264f30b3" resolved "https://registry.yarnpkg.com/@eid-easy/eideasy-browser-client/-/eideasy-browser-client-2.124.0.tgz#940ccb9d4d853f0bd32e49cc455f2c7b13f3bbd1"
integrity sha512-d4fgqF5U+pWuPpfgbb/+BxI2CYThkbviAfl9NbLoKMOMO4bh7HZFxLdW5uU2O8yIeldGFunJWxEbMTLv/2PlTA== integrity sha512-hZuUeg0CcyvgJSseRBQixRStAIr58bulmNcikcASBo6z8wv+/R8nAnUoE7qdNW1l4ZyYxLmVOwDs6+W+FHy6hQ==
dependencies: dependencies:
axios "1.7.8" axios "1.8.2"
jsencrypt "3.2.1" jsencrypt "3.2.1"
lodash "^4.17.21" lodash "^4.17.21"
serialize-error "^9.1.1" serialize-error "^9.1.1"
"@eid-easy/eideasy-widget@^2.132.1": "@eid-easy/eideasy-widget@^2.159.0":
version "2.132.1" version "2.159.0"
resolved "https://registry.yarnpkg.com/@eid-easy/eideasy-widget/-/eideasy-widget-2.132.1.tgz#634c077c55d7e582846dbeae47f6f37796b76bd6" resolved "https://registry.yarnpkg.com/@eid-easy/eideasy-widget/-/eideasy-widget-2.159.0.tgz#f2291dad292bd5f7941496f0db0aa0a180226b6b"
integrity sha512-bZNdKsxja4iIUm6B4x6pOyiBdoMNNUB3615oJgNUWallrfeiIbBQxLwG+m5nmivmHMgdaIQylmtfrhc6e7kgYA== integrity sha512-527uCNrN5MVY/PaOUoZ3J2XZ0C+xt6057sJ4xSO0/FPYj2cxOn+qyCJODQjOhjBL7GcnpShWPpYAfv1OIStYwQ==
dependencies: dependencies:
"@eid-easy/eideasy-browser-client" "2.104.1" "@eid-easy/eideasy-browser-client" "2.124.0"
core-js "^3.8.3" core-js "^3.8.3"
i18n-iso-countries "^6.7.0" i18n-iso-countries "^6.7.0"
lodash.defaultsdeep "^4.6.1" lodash.defaultsdeep "^4.6.1"
@@ -1914,10 +1914,10 @@ available-typed-arrays@^1.0.5:
resolved "https://registry.yarnpkg.com/available-typed-arrays/-/available-typed-arrays-1.0.5.tgz#92f95616501069d07d10edb2fc37d3e1c65123b7" resolved "https://registry.yarnpkg.com/available-typed-arrays/-/available-typed-arrays-1.0.5.tgz#92f95616501069d07d10edb2fc37d3e1c65123b7"
integrity sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw== integrity sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw==
axios@1.7.8: axios@1.8.2:
version "1.7.8" version "1.8.2"
resolved "https://registry.yarnpkg.com/axios/-/axios-1.7.8.tgz#1997b1496b394c21953e68c14aaa51b7b5de3d6e" resolved "https://registry.yarnpkg.com/axios/-/axios-1.8.2.tgz#fabe06e241dfe83071d4edfbcaa7b1c3a40f7979"
integrity sha512-Uu0wb7KNqK2t5K+YQyVCLM76prD5sRFjKHbJYCP1J7JFGEQ6nN7HWn9+04LAeiJ3ji54lgS/gZCH1oxyrf1SPw== integrity sha512-ls4GYBm5aig9vWx8AWDSGLpnpDQRtWAfrjU+EuytuODrFBkqesN2RkOQCBzrA1RQNHw1SmRMSDDDSwzNAYQ6Rg==
dependencies: dependencies:
follow-redirects "^1.15.6" follow-redirects "^1.15.6"
form-data "^4.0.0" form-data "^4.0.0"