diff --git a/app/views/pages/_form.html.erb b/app/views/pages/_form.html.erb index 251443640..230c51a75 100644 --- a/app/views/pages/_form.html.erb +++ b/app/views/pages/_form.html.erb @@ -3,6 +3,9 @@ <% if question_input.answer_type == "file" %>
<%=t('helpers.label.pages_question_input.file_body_html')%>
+ <%= govuk_details(summary_text: t("helpers.label.pages_question_input.summary")) do %> + <% t("helpers.label.pages_question_input.summary_body_html") %> + <% end %> <% end %> <%= f.govuk_text_field :question_text, diff --git a/config/locales/en.yml b/config/locales/en.yml index c695bc5ab..72092c576 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -618,7 +618,7 @@ en: date_of_birth: You can add a short hint to help people answer the question. For a date of birth question you could use ‘For example, 27 3 1998’. default: You can add a short hint to help people answer the question. For example, to explain the format the answer should be in, or where to find the information you’ve asked for. email: You could add a short hint to tell people how you’ll use their email address. For example, ‘We’ll only use your email address to contact you about your application.’ - file: You can add a short hint to help people upload the file you need. For example, you might need the file to contain specific information. + file: You can add a short hint to help people upload the file you need. For example, you might need the file to contain specific information. People will be shown the types of file they can upload. long_text: You can add a short hint to help people answer the question. For example, you could give a bit more detail about the information you need. name: You can add a short hint to help people answer the question. For example, you might need to ask people to enter their name as it’s written on an official document such as a passport or driving licence. national_insurance_number: You can add a short hint to help people answer the question. For example, ‘It’s on your National Insurance card, benefit letter, payslip or P60. For example, QQ 12 34 56 C.’ @@ -705,7 +705,7 @@ en: address: '' date: '' email: '' - file: People will be able to upload an image or a document + file: People will only be able to upload one file name: '' national_insurance_number: '' number: People will only be able to enter whole or decimal numbers @@ -770,8 +770,8 @@ en: default_goto_page_id: Select a question or page pages_question_input: file_body_html: | -People will be able to upload one image or document up to 7MB in size.
-You can have up to 4 file upload questions in a form.
+People can only upload one file for each file upload question.
+A form can have up to 4 file upload questions.
hint_text: Hint text (optional) is_optional_options: 'false': Mandatory @@ -782,6 +782,18 @@ en: question_text: default: Question text file: Ask for a file + summary: What files can people upload? + summary_body_html: | +People can upload the following file types:
+Each file must be smaller than 7MB.
pages_secondary_skip_input: default_goto_page_id: Select a question or page default_routing_page_id: Select a question diff --git a/spec/views/pages/_forms.html.erb_spec.rb b/spec/views/pages/_forms.html.erb_spec.rb index 4ff8594c6..837cc75a7 100644 --- a/spec/views/pages/_forms.html.erb_spec.rb +++ b/spec/views/pages/_forms.html.erb_spec.rb @@ -136,6 +136,7 @@ it "does not display the file body text" do expect(rendered).not_to have_text(I18n.t("helpers.label.pages_question_input.file_body_html")) + expect(rendered).not_to have_text(I18n.t("helpers.label.pages_question_input.summary")) end context "when the answer type is file" do @@ -152,6 +153,8 @@ it "displays the file body text" do expect(rendered).to include(I18n.t("helpers.label.pages_question_input.file_body_html")) + expect(rendered).to have_text(I18n.t("helpers.label.pages_question_input.summary")) + expect(rendered).to include(I18n.t("helpers.label.pages_question_input.summary_body_html")) end it "has a field with the file question text" do