+
<%= form_with model: form, url: form_path, method: :patch do |f| %>
<%= f.govuk_error_summary %>
@@ -34,7 +34,7 @@
:evidence_uploads,
multiple: true,
label: { text: "Upload files", size: "m" },
- hint: { text: "You can upload up to 20 files. Each file must be smaller than #{max_allowed_file_size}. Larger files may take longer to upload. We will let you know when it is done." }
+ hint: { text: "You can upload up to #{FileUploadValidator::MAX_FILES} files. Each file must be smaller than #{max_allowed_file_size}. Larger files may take longer to upload. We will let you know when it is done." }
) %>
<%= f.govuk_submit "Save and continue" %>
diff --git a/app/views/referrals/allegation_evidence/upload/edit.html.erb b/app/views/referrals/allegation_evidence/upload/edit.html.erb
index a01e91701..5875cd02a 100644
--- a/app/views/referrals/allegation_evidence/upload/edit.html.erb
+++ b/app/views/referrals/allegation_evidence/upload/edit.html.erb
@@ -44,7 +44,7 @@
:evidence_uploads,
multiple: true,
label: { text: "Upload files", size: "m" },
- hint: { text: "Must be smaller than #{max_allowed_file_size}" }
+ hint: { text: "You can upload up to #{FileUploadValidator::MAX_FILES} files. Each file must be smaller than #{max_allowed_file_size}. Larger files may take longer to upload. We will let you know when it is done." }
) %>
<%= f.govuk_submit "Save and continue" %>
diff --git a/spec/forms/referrals/allegation_evidence/upload_form_spec.rb b/spec/forms/referrals/allegation_evidence/upload_form_spec.rb
index cecd79ff3..b4735e525 100644
--- a/spec/forms/referrals/allegation_evidence/upload_form_spec.rb
+++ b/spec/forms/referrals/allegation_evidence/upload_form_spec.rb
@@ -71,7 +71,7 @@
fixture_file_upload("upload.txt")
end
expect(upload_form.save).to be false
- expect(upload_form.errors[:evidence_uploads]).to eq(["You can only upload 20 files"])
+ expect(upload_form.errors[:evidence_uploads]).to eq(["You can only upload 40 files"])
end
end
end
diff --git a/spec/system/public_referrals/user_adds_allegation_evidence_spec.rb b/spec/system/public_referrals/user_adds_allegation_evidence_spec.rb
index 3366ef3a6..26f24e692 100644
--- a/spec/system/public_referrals/user_adds_allegation_evidence_spec.rb
+++ b/spec/system/public_referrals/user_adds_allegation_evidence_spec.rb
@@ -360,7 +360,7 @@ def then_cannot_add_more_evidence
def then_i_see_a_list_of_max_uploaded_files
expect(page).to have_content("Uploaded evidence")
within(".govuk-summary-list") do
- expect(page).to have_link("upload1.pdf", count: 20, href: /active_storage/)
+ expect(page).to have_link("upload1.pdf", count: 40, href: /active_storage/)
end
end
end
diff --git a/spec/system/referrals/user_adds_allegation_evidence_spec.rb b/spec/system/referrals/user_adds_allegation_evidence_spec.rb
index a833aae90..6be137ef0 100644
--- a/spec/system/referrals/user_adds_allegation_evidence_spec.rb
+++ b/spec/system/referrals/user_adds_allegation_evidence_spec.rb
@@ -361,7 +361,7 @@ def when_i_upload_the_maximum_number_of_files
def then_i_see_a_list_of_max_uploaded_files
expect(page).to have_content("Uploaded evidence")
within(".govuk-summary-list") do
- expect(page).to have_link("upload1.pdf", count: 20, href: /active_storage/)
+ expect(page).to have_link("upload1.pdf", count: 40, href: /active_storage/)
end
end