From 5995f2e427c1d2d1c7a15d68918eac153f7859e2 Mon Sep 17 00:00:00 2001 From: Pete Matsyburka Date: Sun, 18 Feb 2024 21:06:16 +0200 Subject: [PATCH] show multiple signatures toggle on cloud --- app/views/esign_settings/show.html.erb | 36 +++++++++---------- .../generate_result_attachments.rb | 2 -- 2 files changed, 17 insertions(+), 21 deletions(-) diff --git a/app/views/esign_settings/show.html.erb b/app/views/esign_settings/show.html.erb index 1e8b5455..6f6571c3 100644 --- a/app/views/esign_settings/show.html.erb +++ b/app/views/esign_settings/show.html.erb @@ -123,26 +123,24 @@ <% end %> <% end %> - <% if !Docuseal.multitenant? %> - <% account_config = AccountConfig.where(account: current_account, key: AccountConfig::ESIGNING_PREFERENCE_KEY).first_or_initialize(value: 'multiple') %> - <% if can?(:manage, account_config) %> -
-
-

Preferences

-
- <% if can?(:manage, account_config) %> - <%= form_for account_config, url: account_configs_path, method: :post do |f| %> - <%= f.hidden_field :key %> -
- - Apply multiple PDF digital signatures in the document per each signer - - <%= f.check_box :value, { class: 'toggle', checked: account_config.value == 'multiple', onchange: 'this.form.requestSubmit()' }, 'multiple', 'single' %> -
- <% end %> - <% end %> + <% account_config = AccountConfig.where(account: current_account, key: AccountConfig::ESIGNING_PREFERENCE_KEY).first_or_initialize(value: 'multiple') %> + <% if can?(:manage, account_config) %> +
+
+

Preferences

- <% end %> + <% if can?(:manage, account_config) %> + <%= form_for account_config, url: account_configs_path, method: :post do |f| %> + <%= f.hidden_field :key %> +
+ + Apply multiple PDF digital signatures in the document per each signer + + <%= f.check_box :value, { class: 'toggle', checked: account_config.value == 'multiple', onchange: 'this.form.requestSubmit()' }, 'multiple', 'single' %> +
+ <% end %> + <% end %> +
<% end %>
diff --git a/lib/submissions/generate_result_attachments.rb b/lib/submissions/generate_result_attachments.rb index 0052efb4..d1529519 100644 --- a/lib/submissions/generate_result_attachments.rb +++ b/lib/submissions/generate_result_attachments.rb @@ -341,8 +341,6 @@ module Submissions def fetch_sign_reason(submitter) reason_name = submitter.email || submitter.name || submitter.phone - return sign_reason(reason_name) if Docuseal.multitenant? - config = if Docuseal.multitenant? AccountConfig.where(account: submitter.account, key: AccountConfig::ESIGNING_PREFERENCE_KEY)