|
|
|
|
@ -1,5 +1,8 @@
|
|
|
|
|
<%= render 'shared/turbo_modal_large', title: 'Preferences', close_after_submit: false do %>
|
|
|
|
|
<% options = [['General', 'general'], ['API and Embedding', 'api']] %>
|
|
|
|
|
<% show_api = Docuseal.multitenant? || current_account.testing? || !current_account.linked_account_account %>
|
|
|
|
|
<% options = [%w[General general]] %>
|
|
|
|
|
<% options << ['API and Embedding', 'api'] if show_api %>
|
|
|
|
|
<% if options.size > 1 %>
|
|
|
|
|
<toggle-visible data-element-ids="<%= options.map(&:last).to_json %>" class="relative text-center mt-3 block">
|
|
|
|
|
<div class="join">
|
|
|
|
|
<% options.each_with_index do |(label, value), index| %>
|
|
|
|
|
@ -12,6 +15,7 @@
|
|
|
|
|
<% end %>
|
|
|
|
|
</div>
|
|
|
|
|
</toggle-visible>
|
|
|
|
|
<% end %>
|
|
|
|
|
<div id="general" class="px-5 mb-4">
|
|
|
|
|
<%= form_for @template, url: template_preferences_path(@template), method: :post, html: { autocomplete: 'off', class: 'mt-1' } do |f| %>
|
|
|
|
|
<toggle-on-submit data-element-id="email_saved_alert"></toggle-on-submit>
|
|
|
|
|
@ -62,6 +66,7 @@
|
|
|
|
|
<% end %>
|
|
|
|
|
<%= render 'templates_code_modal/preferences' %>
|
|
|
|
|
</div>
|
|
|
|
|
<% if show_api %>
|
|
|
|
|
<div id="api" class="hidden mt-2 mb-4 px-5">
|
|
|
|
|
<div>
|
|
|
|
|
<label class="text-sm font-semibold" for="template_id">
|
|
|
|
|
@ -98,3 +103,4 @@
|
|
|
|
|
<% end %>
|
|
|
|
|
</div>
|
|
|
|
|
<% end %>
|
|
|
|
|
<% end %>
|
|
|
|
|
|