add flatten pdf toggle

This commit is contained in:
Pete Matsyburka
2024-04-22 21:34:55 +03:00
parent 02a7b6ea55
commit 2d76198290
4 changed files with 33 additions and 11 deletions
+12
View File
@@ -140,6 +140,18 @@
</div>
<% end %>
<% end %>
<% account_config = AccountConfig.find_or_initialize_by(account: current_account, key: AccountConfig::FLATTEN_RESULT_PDF_KEY) %>
<% if can?(:manage, account_config) %>
<%= form_for account_config, url: account_configs_path, method: :post do |f| %>
<%= f.hidden_field :key %>
<div class="flex items-center justify-between py-2.5">
<span>
Remove PDF form fillable fields from the signed PDF (flatten form)
</span>
<%= f.check_box :value, { class: 'toggle', checked: account_config.value != false, onchange: 'this.form.requestSubmit()' } %>
</div>
<% end %>
<% end %>
</div>
<% end %>
</div>