pull/627/head^2
chapsjust 3 months ago
parent 3bdfc55680
commit 53eaaff2bd

@ -46,9 +46,15 @@ class UsersController < ApplicationController
@user.role = User.admin_role unless role_valid?(@user.role) @user.role = User.admin_role unless role_valid?(@user.role)
if @user.save if @user.save
UserMailer.invitation_email(@user).deliver_later! begin
UserMailer.invitation_email(@user).deliver_later!
redirect_back fallback_location: settings_users_path, notice: I18n.t('user_has_been_invited') redirect_back fallback_location: settings_users_path, notice: I18n.t('user_has_been_invited')
rescue StandardError => e
Rollbar.error(e) if defined?(Rollbar)
redirect_back fallback_location: settings_users_path, alert: I18n.t('failed')
end
else else
render turbo_stream: turbo_stream.replace(:modal, template: 'users/new'), status: :unprocessable_content render turbo_stream: turbo_stream.replace(:modal, template: 'users/new'), status: :unprocessable_content
end end

@ -1,26 +1,28 @@
<div class="flex flex-wrap space-y-4 md:flex-nowrap md:space-y-0"> <div class="flex flex-wrap space-y-4 md:flex-nowrap md:space-y-0">
<%= render 'shared/settings_nav' %> <%= render 'shared/settings_nav' %>
<div class="flex-grow max-w-xl mx-auto"> <div class="flex-grow max-w-xl mx-auto">
<p class="text-4xl font-bold mb-4"> <h1 id="email-templates-heading" class="text-4xl font-bold mb-4">
<%= t('email_templates') %> <%= t('email_templates') %>
</p> </h1>
<div class="space-y-4"> <section aria-labelledby="email-templates-heading" class="space-y-4">
<%= render 'signature_request_email_form' %> <%= render 'signature_request_email_form' %>
<%= render 'documents_copy_email_form' %> <%= render 'documents_copy_email_form' %>
<%= render 'submitter_completed_email_form' %> <%= render 'submitter_completed_email_form' %>
</div> </section>
<p class="text-4xl font-bold mb-4 mt-8"> <h2 id="company-logo-heading" class="text-4xl font-bold mb-4 mt-8">
<%= t('company_logo') %> <%= t('company_logo') %>
</p> </h2>
<%= render 'logo_form' %> <section aria-labelledby="company-logo-heading" class="space-y-4">
<p class="text-4xl font-bold mb-4 mt-8"> <%= render 'logo_form' %>
</section>
<h2 id="submission-form-heading" class="text-4xl font-bold mb-4 mt-8">
<%= t('submission_form') %> <%= t('submission_form') %>
</p> </h2>
<div class="space-y-4"> <section aria-labelledby="submission-form-heading" class="space-y-4">
<%= render 'form_completed_message_form' %> <%= render 'form_completed_message_form' %>
<%= render 'form_completed_button_form' %> <%= render 'form_completed_button_form' %>
<%= render 'form_policy_links_form' %> <%= render 'form_policy_links_form' %>
</div> </section>
<%= render 'form_customization_settings' %> <%= render 'form_customization_settings' %>
</div> </div>
<div class="w-0 md:w-52"></div> <div class="w-0 md:w-52"></div>

@ -73,9 +73,9 @@ Rails.application.configure do
config.action_mailer.perform_caching = false config.action_mailer.perform_caching = false
# Ignore bad email addresses and do not raise email delivery errors. # Keep delivery errors visible in production by default so failed invite
# Set this to true and configure the email server for immediate delivery to raise delivery errors. # emails are observable. Set to false to silence errors if needed.
config.action_mailer.raise_delivery_errors = false config.action_mailer.raise_delivery_errors = ENV.fetch('RAISE_EMAIL_DELIVERY_ERRORS', 'true') == 'true'
if ENV['SMTP_ADDRESS'] if ENV['SMTP_ADDRESS']
config.action_mailer.delivery_method = :smtp config.action_mailer.delivery_method = :smtp

@ -8,7 +8,7 @@ services:
- ./docuseal:/data/docuseal - ./docuseal:/data/docuseal
- ${INTEBEC_CONFIG_FILE:-./config/config.yml}:/run/secrets/config.yml:ro - ${INTEBEC_CONFIG_FILE:-./config/config.yml}:/run/secrets/config.yml:ro
environment: environment:
- FORCE_SSL=${HOST} - FORCE_SSL=${FORCE_SSL:-false}
# File mode: mount a config.yml (see volumes below). # File mode: mount a config.yml (see volumes below).
# API mode: remove the volume mount and set INTEBEC_LICENCE_KEY + INTEBEC_SECRET_KEY. # API mode: remove the volume mount and set INTEBEC_LICENCE_KEY + INTEBEC_SECRET_KEY.
- INTEBEC_CONFIG_PATH=/run/secrets/config.yml - INTEBEC_CONFIG_PATH=/run/secrets/config.yml

Loading…
Cancel
Save