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.
docuseal/app/views/notifications_settings/index.html.erb

33 lines
1.5 KiB

<div class="max-w-4xl mx-auto space-y-8">
<h1 class="text-3xl md:text-4xl font-bold tracking-tight text-base-content">
<%= t('email_notifications') %>
</h1>
<section class="bg-base-100 rounded-xl border border-base-300 p-6 md:p-8 shadow-soft">
<h2 class="text-lg font-semibold text-base-content mb-5"><%= t('notification_preferences', default: 'Notification Preferences') %></h2>
<div class="mt-2 mb-1">
<% user_config = UserConfig.find_or_initialize_by(user: current_user, key: UserConfig::RECEIVE_COMPLETED_EMAIL) %>
<% if can?(:manage, user_config) %>
<%= form_for user_config, url: user_configs_path, method: :post do |f| %>
<%= f.hidden_field :key %>
<div class="flex items-center justify-between">
<span>
<%= t('receive_notification_emails_on_completed_submission') %>
</span>
<submit-form data-on="change" class="flex">
<%= f.check_box :value, class: 'toggle', checked: user_config.value != false %>
</submit-form>
</div>
<% end %>
<% end %>
</div>
<%= render 'bcc_form', config: @bcc_config %>
</section>
<section class="bg-base-100 rounded-xl border border-base-300 p-6 md:p-8 shadow-soft">
<h2 class="text-lg font-semibold text-base-content mb-5">
<%= t('sign_request_email_reminders') %>
</h2>
<%= render 'reminder_banner' %>
<%= render 'reminder_form', config: @reminder_config %>
</section>
</div>