diff --git a/app/helpers/authorization_requests_helpers.rb b/app/helpers/authorization_requests_helpers.rb index e9c338cdc..4013e65af 100644 --- a/app/helpers/authorization_requests_helpers.rb +++ b/app/helpers/authorization_requests_helpers.rb @@ -33,11 +33,6 @@ def within_summary? end # rubocop:enable Rails/HelperInstanceVariable - def single_page_form?(authorization_request) - !authorization_request.display_prefilled_banner_for_each_block? && - authorization_request.prefilled_data?(authorization_request.data.keys) - end - # rubocop:disable Rails/HelperInstanceVariable def english_step_name(translated_step_key = nil) if translated_step_key.nil? diff --git a/app/views/authorization_request_forms/_form.html.erb b/app/views/authorization_request_forms/_form.html.erb index 0b26616bf..2f8f22b6b 100644 --- a/app/views/authorization_request_forms/_form.html.erb +++ b/app/views/authorization_request_forms/_form.html.erb @@ -16,10 +16,6 @@ <%= render partial: "authorization_request_forms/shared/block_titles", locals: { f: f, block_name: english_step_name(params[:id]) } %> <% end %> - <% if single_page_form?(@authorization_request) && !within_edit? && !within_summary? %> - <%= render partial: "authorization_request_forms/shared/prefilled_banner" %> - <% end %> - <%= yield %> diff --git a/app/views/authorization_request_forms/api_entreprise_through_editor.html.erb b/app/views/authorization_request_forms/api_entreprise_through_editor.html.erb index 858fbcc7a..7d312b2b2 100644 --- a/app/views/authorization_request_forms/api_entreprise_through_editor.html.erb +++ b/app/views/authorization_request_forms/api_entreprise_through_editor.html.erb @@ -1,4 +1,5 @@ <%= authorization_request_form(@authorization_request) do |f| %> + <%= render partial: 'authorization_request_forms/shared/prefilled_banner_for_single_page_form' %> <%= render partial: "authorization_request_forms/shared/block_titles", locals: { f:, block_name: :contacts } %> diff --git a/app/views/authorization_request_forms/api_particulier_through_editor.html.erb b/app/views/authorization_request_forms/api_particulier_through_editor.html.erb index 6718f4737..705c6b720 100644 --- a/app/views/authorization_request_forms/api_particulier_through_editor.html.erb +++ b/app/views/authorization_request_forms/api_particulier_through_editor.html.erb @@ -1,4 +1,6 @@ <%= authorization_request_form(@authorization_request) do |f| %> + <%= render partial: 'authorization_request_forms/shared/prefilled_banner_for_single_page_form' %> +

Ce formulaire simplifié vous permet d'obtenir une habilitation pour un logiciel pré-configuré de l'éditeur <%= @authorization_request.form.service_provider.name %>. Une partie des informations diff --git a/app/views/authorization_request_forms/api_particulier_through_editor_without_contact_technique.html.erb b/app/views/authorization_request_forms/api_particulier_through_editor_without_contact_technique.html.erb index c34fce212..94a301467 100644 --- a/app/views/authorization_request_forms/api_particulier_through_editor_without_contact_technique.html.erb +++ b/app/views/authorization_request_forms/api_particulier_through_editor_without_contact_technique.html.erb @@ -1,4 +1,6 @@ <%= authorization_request_form(@authorization_request) do |f| %> + <%= render partial: 'authorization_request_forms/shared/prefilled_banner_for_single_page_form' %> +

Ce formulaire simplifié vous permet d'obtenir une habilitation pour un logiciel pré-configuré de l'éditeur <%= @authorization_request.form.service_provider.name %>. Une partie des informations diff --git a/app/views/authorization_request_forms/hubee_cert_dc.html.erb b/app/views/authorization_request_forms/hubee_cert_dc.html.erb index 2e47ba31a..1f4e6d720 100644 --- a/app/views/authorization_request_forms/hubee_cert_dc.html.erb +++ b/app/views/authorization_request_forms/hubee_cert_dc.html.erb @@ -1,4 +1,6 @@ <%= authorization_request_form(@authorization_request) do |f| %> + <%= render partial: 'authorization_request_forms/shared/prefilled_banner_for_single_page_form' %> +

<%= render partial: "authorization_requests/shared/organization_and_applicant" %>
diff --git a/app/views/authorization_request_forms/hubee_dila.html.erb b/app/views/authorization_request_forms/hubee_dila.html.erb index 80f953333..93b34d427 100644 --- a/app/views/authorization_request_forms/hubee_dila.html.erb +++ b/app/views/authorization_request_forms/hubee_dila.html.erb @@ -1,13 +1,15 @@ <%= authorization_request_form(@authorization_request) do |f| %> + <%= render partial: 'authorization_request_forms/shared/prefilled_banner_for_single_page_form' %> +
<%= render partial: "authorization_requests/shared/organization_and_applicant" %>
- + <%= render partial: "authorization_request_forms/shared/block_titles", locals: { f: f, block_name: :scopes } %> <%= render partial: 'authorization_request_forms/shared/scopes', locals: { f: } %> - + <%= render partial: "authorization_request_forms/shared/block_titles", locals: { f: f, block_name: :contacts } %> <%= render partial: 'authorization_request_forms/shared/contacts', locals: { f: } %> - + <%= render partial: 'authorization_request_forms/shared/submit_buttons', locals: { f: } %> <% end %> diff --git a/app/views/authorization_request_forms/shared/_prefilled_banner_for_single_page_form.html.erb b/app/views/authorization_request_forms/shared/_prefilled_banner_for_single_page_form.html.erb new file mode 100644 index 000000000..29e7a0924 --- /dev/null +++ b/app/views/authorization_request_forms/shared/_prefilled_banner_for_single_page_form.html.erb @@ -0,0 +1,4 @@ +<% if @authorization_request.prefilled_data?(@authorization_request.data.keys) && !within_edit? && !within_summary? %> + <%= render partial: "authorization_request_forms/shared/prefilled_banner" %> +<% end %> + diff --git a/app/views/authorization_request_forms/shared/single_page/_api_service_national.html.erb b/app/views/authorization_request_forms/shared/single_page/_api_service_national.html.erb index a775bd672..6da655b2c 100644 --- a/app/views/authorization_request_forms/shared/single_page/_api_service_national.html.erb +++ b/app/views/authorization_request_forms/shared/single_page/_api_service_national.html.erb @@ -1,4 +1,6 @@ <%= authorization_request_form(@authorization_request) do |f| %> + <%= render partial: 'authorization_request_forms/shared/prefilled_banner_for_single_page_form' %> + <%= render partial: "authorization_request_forms/shared/block_titles", locals: { f: f, block_name: :basic_infos } %> <%= render partial: 'authorization_request_forms/shared/basic_infos', locals: { f: f } %>