diff --git a/app/controllers/start_form_controller.rb b/app/controllers/start_form_controller.rb
index ee05ff28..b77f092d 100644
--- a/app/controllers/start_form_controller.rb
+++ b/app/controllers/start_form_controller.rb
@@ -25,7 +25,7 @@ class StartFormController < ApplicationController
redirect_to start_form_completed_path(@template.slug, email: submitter_params[:email])
else
if filter_undefined_submitters(@template).size > 1 && @submitter.new_record?
- @error_message = I18n.t('not_found')
+ @error_message = multiple_submitters_error_message
return render :show
end
@@ -117,4 +117,14 @@ class StartFormController < ApplicationController
@template = Template.find_by!(slug:)
end
+
+ # rubocop:disable Layout/LineLength
+ def multiple_submitters_error_message
+ if current_user&.account_id == @template.account_id
+ helpers.t('this_submission_has_multiple_signers_which_prevents_the_use_of_a_sharing_link_as_its_unclear_which_signer_is_responsible_for_specific_fields_to_resolve_this_follow_this_guide_to_define_the_default_signer_details_html')
+ else
+ I18n.t('not_found')
+ end
+ end
+ # rubocop:enable Layout/LineLength
end
diff --git a/app/views/start_form/show.html.erb b/app/views/start_form/show.html.erb
index b38ab33b..966f70ff 100644
--- a/app/views/start_form/show.html.erb
+++ b/app/views/start_form/show.html.erb
@@ -30,7 +30,9 @@
<%= f.label :email, t('email'), class: 'label' %>
<%= f.email_field :email, value: current_user&.email || params[:email] || @submitter.email, required: true, class: 'base-input', placeholder: t('provide_your_email_to_start') %>
- <%= @error_message %>
+ <% if @error_message %>
+ <%= @error_message %>
+ <% end %>
<%= f.button button_title(title: t('start'), disabled_with: t('starting')), class: 'base-button' %>
diff --git a/config/locales/i18n.yml b/config/locales/i18n.yml
index e39a0ce4..978dae46 100644
--- a/config/locales/i18n.yml
+++ b/config/locales/i18n.yml
@@ -700,6 +700,7 @@ en: &en
submission_created_via_source_html: 'Submission created via %{source}'
pro_user_seats_used: Pro user seats used
manage_plan: Manage plan
+ this_submission_has_multiple_signers_which_prevents_the_use_of_a_sharing_link_as_its_unclear_which_signer_is_responsible_for_specific_fields_to_resolve_this_follow_this_guide_to_define_the_default_signer_details_html: This submission has multiple signers, which prevents the use of a sharing link as it's unclear which signer is responsible for specific fields. To resolve this, follow this guide to define the default signer details.
submission_sources:
api: API
bulk: Bulk Send
@@ -1426,6 +1427,7 @@ es: &es
submission_created_via_source_html: 'Envío creado a través de %{source}'
pro_user_seats_used: Plazas de usuario Pro en uso
manage_plan: Gestionar plan
+ this_submission_has_multiple_signers_which_prevents_the_use_of_a_sharing_link_as_its_unclear_which_signer_is_responsible_for_specific_fields_to_resolve_this_follow_this_guide_to_define_the_default_signer_details_html: 'Este envío tiene múltiples firmantes, lo que impide el uso de un enlace para compartir, ya que no está claro qué firmante es responsable de los campos específicos. Para resolver esto, sigue esta guía para definir los detalles predeterminados del firmante.'
submission_sources:
api: API
bulk: Envío masivo
@@ -2151,6 +2153,7 @@ it: &it
submission_created_via_source_html: 'Invio creato tramite %{source}'
pro_user_seats_used: Posti utente Pro in uso
manage_plan: Gestisci piano
+ this_submission_has_multiple_signers_which_prevents_the_use_of_a_sharing_link_as_its_unclear_which_signer_is_responsible_for_specific_fields_to_resolve_this_follow_this_guide_to_define_the_default_signer_details_html: "Questa sottomissione ha più firmatari, il che impedisce l'uso di un link di condivisione poiché non è chiaro quale firmatario sia responsabile di specifici campi. Per risolvere questo problema, segui questa guida per definire i dettagli predefiniti del firmatario."
submission_sources:
api: API
bulk: Invio massivo
@@ -2878,6 +2881,7 @@ fr: &fr
submission_created_via_source_html: 'Soumission créée via %{source}'
pro_user_seats_used: Places utilisateur Pro en cours d'utilisation
manage_plan: Gérer le plan
+ this_submission_has_multiple_signers_which_prevents_the_use_of_a_sharing_link_as_its_unclear_which_signer_is_responsible_for_specific_fields_to_resolve_this_follow_this_guide_to_define_the_default_signer_details_html: 'Cette soumission comporte plusieurs signataires, ce qui empêche l’utilisation d’un lien de partage, car il n’est pas clair quel signataire est responsable de quels champs. Pour résoudre ce problème, suivez ce guide pour définir les détails du signataire par défaut.'
submission_sources:
api: API
bulk: Envoi en masse
@@ -3604,6 +3608,7 @@ pt: &pt
submission_created_via_source_html: 'Envio criado via %{source}'
pro_user_seats_used: Lugares de usuário Pro em uso
manage_plan: Gerenciar plano
+ this_submission_has_multiple_signers_which_prevents_the_use_of_a_sharing_link_as_its_unclear_which_signer_is_responsible_for_specific_fields_to_resolve_this_follow_this_guide_to_define_the_default_signer_details_html: 'Este envio tem vários signatários, o que impede o uso de um link de compartilhamento, pois não está claro qual signatário é responsável por quais campos. Para resolver isso, siga este guia para definir os detalhes padrão do signatário.'
submission_sources:
api: API
bulk: Envio em massa
@@ -4330,6 +4335,7 @@ de: &de
submission_created_via_source_html: 'Übermittlung erstellt über %{source}'
pro_user_seats_used: Verwendete Pro-Benutzerplätze
manage_plan: Plan verwalten
+ this_submission_has_multiple_signers_which_prevents_the_use_of_a_sharing_link_as_its_unclear_which_signer_is_responsible_for_specific_fields_to_resolve_this_follow_this_guide_to_define_the_default_signer_details_html: 'Diese Übermittlung hat mehrere Unterzeichner, was die Nutzung eines Freigabelinks verhindert, da unklar ist, welcher Unterzeichner für welche Felder verantwortlich ist. Um dies zu lösen, folgen Sie dieser Anleitung, um die Standarddetails des Unterzeichners festzulegen.'
submission_sources:
api: API
bulk: Massenversand
diff --git a/spec/system/signing_form_spec.rb b/spec/system/signing_form_spec.rb
index be486c65..e9c41fce 100644
--- a/spec/system/signing_form_spec.rb
+++ b/spec/system/signing_form_spec.rb
@@ -796,6 +796,40 @@ RSpec.describe 'Signing Form', type: :system do
end
end
+ context 'when the template requires multiple submitters' do
+ let(:template) { create(:template, submitter_count: 2, account:, author:, only_field_types: %w[text]) }
+
+ context 'when default signer details are not defined' do
+ it 'shows an explanation error message if a logged-in user associated with the template account opens the link' do
+ sign_in author
+ visit start_form_path(slug: template.slug)
+ fill_in 'Email', with: author.email
+ click_button 'Start'
+
+ expect(page).to have_content('This submission has multiple signers, which prevents the use of a sharing link ' \
+ "as it's unclear which signer is responsible for specific fields. " \
+ 'To resolve this, follow this guide to define the default signer details.')
+ expect(page).to have_link('guide', href: 'https://www.docuseal.com/resources/pre-filling-recipients')
+ end
+
+ it 'shows a "Not found" error message if a logged-out user associated with the template account opens the link' do
+ visit start_form_path(slug: template.slug)
+ fill_in 'Email', with: author.email
+ click_button 'Start'
+
+ expect(page).to have_content('Not found')
+ end
+
+ it 'shows a "Not found" error message if an unrelated user opens the link' do
+ visit start_form_path(slug: template.slug)
+ fill_in 'Email', with: 'john.doe@example.com'
+ click_button 'Start'
+
+ expect(page).to have_content('Not found')
+ end
+ end
+ end
+
it 'sends completed email' do
template = create(:template, account:, author:, only_field_types: %w[text signature])
submission = create(:submission, template:)