diff --git a/app/components/bulk_upload_error_row_component.html.erb b/app/components/bulk_upload_error_row_component.html.erb index 65e38613f..4bd303957 100644 --- a/app/components/bulk_upload_error_row_component.html.erb +++ b/app/components/bulk_upload_error_row_component.html.erb @@ -13,7 +13,7 @@ <% if critical_errors.any? %>
These errors must be fixed to complete your logs.
- <%= govuk_table do |table| %> + <%= govuk_table(html_attributes: { class: potential_errors.any? ? "" : "no-bottom-border" }) do |table| %> <%= table.with_head do |head| %> <% head.with_row do |row| %> <% row.with_cell(header: true, text: "Cell") %> @@ -39,7 +39,7 @@ <% if potential_errors.any? %>The following groups of cells might have conflicting data. Check the answers and fix any incorrect data.
If the answers are correct, fix the critical errors and reupload the file. You'll need to confirm that the following data is correct when the file only contains potential errors.
This file will be available for all users to download. @@ -21,9 +21,22 @@ <%= f.govuk_file_field :file, label: { text: "Upload file", size: "m" } %> + <% if resource_exists %> +
Current file: <%= govuk_link_to @collection_resource.download_filename, href: @collection_resource.download_path %>
+ <% end %> - <%= f.govuk_submit resource_exists ? "Save changes" : "Upload" %> - <%= govuk_button_link_to "Cancel", collection_resources_path, secondary: true %> + <% unless @collection_resource.mandatory %> + <%= f.govuk_text_field :short_display_name, + label: { text: "Resource type", size: "m" }, + hint: { text: safe_join(["This will be used in the download link on the homepage. Do not include the log type or collection year.", + content_tag(:br), + "For example, if you enter “bulk upload change log”, the download link will say “Download the #{@collection_resource.log_type} bulk upload change log (#{text_year_range_format(@collection_resource.year)})”."]) } %> + <% end %> + + <% end %>+ This file will be available for all users to download. +
+ + <%= f.govuk_file_field :file, + label: { text: "Upload file", size: "m" } %> + + <%= f.govuk_text_field :short_display_name, + label: { text: "Resource type", size: "m" }, + hint: { text: safe_join(["This will be used in the download link on the homepage. Do not include the log type or collection year.", + content_tag(:br), + "For example, if you enter “bulk upload change log”, the download link will say “Download the #{@collection_resource.log_type} bulk upload change log (#{text_year_range_format(@collection_resource.year)})”."]) } %> + + + <% end %> +