From 16a00eea4759843c31781a95ab4189a7f17dee1e Mon Sep 17 00:00:00 2001 From: Lubos Hricak Date: Mon, 24 Jun 2024 15:40:13 +0200 Subject: [PATCH 1/2] Change copy when application needs reference/nickname to be filled --- app/views/content_only/_award_nickname.html.slim | 2 +- .../content_only/_award_nickname_block.html.slim | 15 +++++++++++---- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/app/views/content_only/_award_nickname.html.slim b/app/views/content_only/_award_nickname.html.slim index a0ab2ad56..b394f1f40 100644 --- a/app/views/content_only/_award_nickname.html.slim +++ b/app/views/content_only/_award_nickname.html.slim @@ -46,7 +46,7 @@ ' up to this date. - if is_nickname_required - = render "content_only/award_nickname_block" + = render partial: "content_only/award_nickname_block", locals: { award_type: award_type } p#get-started.get-started.group.govuk-body - title = is_nickname_required ? "Save and start eligibility questionnaire" : "Start eligibility questionnaire" diff --git a/app/views/content_only/_award_nickname_block.html.slim b/app/views/content_only/_award_nickname_block.html.slim index 237ea573c..9d75076b9 100644 --- a/app/views/content_only/_award_nickname_block.html.slim +++ b/app/views/content_only/_award_nickname_block.html.slim @@ -4,9 +4,16 @@ br h2.govuk-label-wrapper = label_tag :nickname, "Please choose a reference for this application:", class: 'govuk-label govuk-label--l', for: 'award-nickname' - p.govuk-hint - | If you have more than one innovation (and want them to be considered for an award), you will have to submit a separate application for each of them. - p.govuk-hint - | You can create a reference, for example, 'Fibre optic device' so that it helps you and your collaborators to distinguish between different innovation applications. It will appear on the Applications page. Once chosen, your reference is permanent. + - if local_assigns[:award_type] == "innovation" + p.govuk-hint + | If you have more than one innovation (and want them to be considered for an award), you will have to submit a separate application for each of them. + p.govuk-hint + | Please create a reference. This will help you and your collaborators distinguish between different applications. Your reference will appear on the Applications page. Once chosen, it is permanent. + - elsif local_assigns[:award_type] == "mobility" + p.govuk-hint + | If you are applying for more than one Promoting Opportunity Award (through social mobility), you will have to submit a separate application for each. + p.govuk-hint + | You can create a reference, for example, 'Fibre optic device' so that it helps you and your collaborators to distinguish between different innovation applications. It will appear on the Applications page. Once chosen, your reference is permanent. = text_field_tag :nickname, "", autocomplete: "off", required: true, type: "text", class: "govuk-input govuk-!-width-two-thirds", id: 'award-nickname' + From 9013b83e8648210354677daab5c8edc12be6b4e7 Mon Sep 17 00:00:00 2001 From: Lubos Hricak Date: Mon, 24 Jun 2024 15:51:53 +0200 Subject: [PATCH 2/2] Add `aria-required` to the input --- app/views/content_only/_award_nickname_block.html.slim | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/views/content_only/_award_nickname_block.html.slim b/app/views/content_only/_award_nickname_block.html.slim index 9d75076b9..376c3764e 100644 --- a/app/views/content_only/_award_nickname_block.html.slim +++ b/app/views/content_only/_award_nickname_block.html.slim @@ -15,5 +15,4 @@ br p.govuk-hint | You can create a reference, for example, 'Fibre optic device' so that it helps you and your collaborators to distinguish between different innovation applications. It will appear on the Applications page. Once chosen, your reference is permanent. - = text_field_tag :nickname, "", autocomplete: "off", required: true, type: "text", class: "govuk-input govuk-!-width-two-thirds", id: 'award-nickname' - + = text_field_tag :nickname, "", autocomplete: "off", required: true, aria: { required: true }, type: "text", class: "govuk-input govuk-!-width-two-thirds", id: 'award-nickname'