mirror of https://github.com/docusealco/docuseal
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
31 lines
1.4 KiB
31 lines
1.4 KiB
<div class="space-y-2">
|
|
<p class="text-4xl font-bold mb-4 mt-8"><%= t('ui_visibility') %></p>
|
|
<% [
|
|
[AccountConfig::SHOW_CONSOLE_LINK_KEY, t('show_console_link')],
|
|
[AccountConfig::SHOW_API_LINK_KEY, t('show_api_link')],
|
|
[AccountConfig::SHOW_TEST_MODE_KEY, t('show_test_mode')],
|
|
[AccountConfig::SHOW_SUPPORT_LINKS_KEY, t('show_support_links')]
|
|
].each do |key, label| %>
|
|
<% env_var_name = "DOCUSEAL_CONFIG_#{key.upcase}" %>
|
|
<% locked = ENV.fetch(env_var_name, nil).present? %>
|
|
<% current = current_account.ui_visible?(key, default: true) %>
|
|
<%= form_for(AccountConfig.new,
|
|
url: settings_personalization_path,
|
|
method: :post,
|
|
html: { class: 'flex items-center justify-between py-1' }) do |f| %>
|
|
<%= f.hidden_field :key, value: key %>
|
|
<%= f.hidden_field :value, value: current ? 'false' : 'true' %>
|
|
<label class="flex items-center space-x-3 flex-grow"
|
|
<%= "title=\"#{t('locked_by_env')}\"".html_safe if locked %>>
|
|
<submit-form data-on="change" class="flex">
|
|
<%= check_box_tag nil, '1', current, class: 'toggle toggle-sm', disabled: locked, onchange: 'this.form.submit()' %>
|
|
</submit-form>
|
|
<span class="text-base"><%= label %></span>
|
|
<% if locked %>
|
|
<span class="text-xs text-base-content/60">(<%= t('locked_by_env') %>)</span>
|
|
<% end %>
|
|
</label>
|
|
<% end %>
|
|
<% end %>
|
|
</div>
|