From 7aba2eb4dabb2db2ce9184d976ba2775faba3b94 Mon Sep 17 00:00:00 2001 From: Pete Matsyburka Date: Thu, 12 Mar 2026 08:58:56 +0200 Subject: [PATCH] disable decline --- app/views/accounts/show.html.erb | 30 ++++++++++++++++-------------- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/app/views/accounts/show.html.erb b/app/views/accounts/show.html.erb index 5093d7bf..8ee0e45f 100644 --- a/app/views/accounts/show.html.erb +++ b/app/views/accounts/show.html.erb @@ -131,21 +131,23 @@ <% end %> <% end %> - <% account_config = AccountConfig.find_or_initialize_by(account: current_account, key: AccountConfig::ALLOW_TO_DECLINE_KEY) %> - <% if can?(:manage, account_config) %> - <%= form_for account_config, url: account_configs_path, method: :post do |f| %> - <%= f.hidden_field :key %> -
-
- <%= t('allow_to_decline_documents') %> - - <%= svg_icon('info_circle', class: 'hidden md:inline-block w-4 h-4 shrink-0') %> - + <% if !Docuseal.multitenant? || can?(:manage, :disable_decline) %> + <% account_config = AccountConfig.find_or_initialize_by(account: current_account, key: AccountConfig::ALLOW_TO_DECLINE_KEY) %> + <% if can?(:manage, account_config) %> + <%= form_for account_config, url: account_configs_path, method: :post do |f| %> + <%= f.hidden_field :key %> +
+
+ <%= t('allow_to_decline_documents') %> + + <%= svg_icon('info_circle', class: 'hidden md:inline-block w-4 h-4 shrink-0') %> + +
+ + <%= f.check_box :value, class: 'toggle', checked: account_config.value != false %> +
- - <%= f.check_box :value, class: 'toggle', checked: account_config.value != false %> - -
+ <% end %> <% end %> <% end %> <% account_config = AccountConfig.find_or_initialize_by(account: current_account, key: AccountConfig::FORM_PREFILL_SIGNATURE_KEY) %>