diff --git a/app/models/forms/bulk_upload_form/prepare_your_file.rb b/app/models/forms/bulk_upload_form/prepare_your_file.rb index 1838e754f..7ef0355b5 100644 --- a/app/models/forms/bulk_upload_form/prepare_your_file.rb +++ b/app/models/forms/bulk_upload_form/prepare_your_file.rb @@ -10,12 +10,7 @@ module Forms attribute :organisation_id, :integer def view_path - case year - when 2024 - "bulk_upload_#{log_type}_logs/forms/prepare_your_file_2024" - when 2025 - "bulk_upload_#{log_type}_logs/forms/prepare_your_file_2025" - end + "bulk_upload_#{log_type}_logs/forms/prepare_your_file" end def back_path @@ -44,6 +39,10 @@ module Forms "#{year} to #{year + 1}" end + def slash_year_combo + "#{year}/#{(year + 1)%100}" + end + def save! true end diff --git a/app/views/bulk_upload_sales_logs/forms/prepare_your_file_2024.html.erb b/app/views/bulk_upload_sales_logs/forms/prepare_your_file.html.erb similarity index 82% rename from app/views/bulk_upload_sales_logs/forms/prepare_your_file_2024.html.erb rename to app/views/bulk_upload_sales_logs/forms/prepare_your_file.html.erb index 723ae5314..00c693cd4 100644 --- a/app/views/bulk_upload_sales_logs/forms/prepare_your_file_2024.html.erb +++ b/app/views/bulk_upload_sales_logs/forms/prepare_your_file.html.erb @@ -14,15 +14,15 @@

Download template

-

Use one of these templates to upload logs for 2024/25:

-

<%= govuk_link_to "Download the sales bulk upload template (2024 to 2025)", @form.template_path %>: In this template, the questions are in the same order as the 2024/25 paper form and web form.

+

Use one of these templates to upload logs for <%= @form.slash_year_combo %>:

+

<%= govuk_link_to "Download the sales bulk upload template (#{@form.year_combo})", @form.template_path %>: In this template, the questions are in the same order as the <%= @form.slash_year_combo %> paper form and web form.

There are 8 rows of content in the templates. These rows are called the ‘headers’. They contain the CORE form questions and guidance about which questions are required and how to format your answers.

Create your file

<%= govuk_list [ "Fill in the template with data from your housing management system. Your data should go below the headers, with one row per log. The bulk upload fields start at column B. Leave column A blank.", "Make sure each column of your data aligns with the matching headers above. You may need to reorder your data.", - "Use the #{govuk_link_to 'Sales bulk upload Specification (2024 to 2025)', @form.specification_path} to check your data is in the correct format.".html_safe, + "Use the #{govuk_link_to "Sales bulk upload Specification (#{@form.year_combo})", @form.specification_path} to check your data is in the correct format.".html_safe, "Username field: To assign a log to someone else, enter the email address they use to log into CORE.".html_safe, "If you have reordered the headers, keep the headers in the file.", ], type: :bullet %> diff --git a/app/views/bulk_upload_sales_logs/forms/prepare_your_file_2025.html.erb b/app/views/bulk_upload_sales_logs/forms/prepare_your_file_2025.html.erb deleted file mode 100644 index fd5c623da..000000000 --- a/app/views/bulk_upload_sales_logs/forms/prepare_your_file_2025.html.erb +++ /dev/null @@ -1,36 +0,0 @@ -<% content_for :before_content do %> - <%= govuk_back_link href: @form.back_path %> -<% end %> - -
-
- <%= form_with model: @form, scope: :form, url: bulk_upload_sales_log_path(id: "prepare-your-file"), method: :patch do |f| %> - <%= f.hidden_field :year %> - <%= f.hidden_field :organisation_id %> - - Upload sales logs in bulk (<%= @form.year_combo %>) -

Prepare your file

-

<%= govuk_link_to "Read the full guidance", bulk_upload_sales_log_path(id: "guidance", form: { year: @form.year }, referrer: "prepare-your-file") %> before you start if you have not used bulk upload before.

- -

Download template

- -

Use one of these templates to upload logs for 2025/26:

-

<%= govuk_link_to "Download the sales bulk upload template (2025 to 2026)", @form.template_path %>: In this template, the questions are in the same order as the 2025/26 paper form and web form.

-

There are 8 rows of content in the templates. These rows are called the ‘headers’. They contain the CORE form questions and guidance about which questions are required and how to format your answers.

- -

Create your file

- <%= govuk_list [ - "Fill in the template with data from your housing management system. Your data should go below the headers, with one row per log. The bulk upload fields start at column B. Leave column A blank.", - "Make sure each column of your data aligns with the matching headers above. You may need to reorder your data.", - "Use the #{govuk_link_to 'Sales bulk upload Specification (2025 to 2026)', @form.specification_path} to check your data is in the correct format.".html_safe, - "Username field: To assign a log to someone else, enter the email address they use to log into CORE.".html_safe, - "If you have reordered the headers, keep the headers in the file.", - ], type: :bullet %> - -

Save your file

- <%= govuk_list ["Save your file as a CSV.", "Your file should now be ready to upload."], type: :bullet %> - - <%= f.govuk_submit %> - <% end %> -
-