From 6195cd428fa1155aa8e883ef135f40ee8aca7a23 Mon Sep 17 00:00:00 2001 From: cairnsj <51908793+cairnsj@users.noreply.github.com> Date: Mon, 4 Sep 2023 14:22:42 +0100 Subject: [PATCH 1/2] fix: give accordion sections unique ids --- .../Views/Shared/_DetailedRole.cshtml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/Childrens-Social-Care-CPD/Views/Shared/_DetailedRole.cshtml b/Childrens-Social-Care-CPD/Views/Shared/_DetailedRole.cshtml index 8082f1a0..91e80fa4 100644 --- a/Childrens-Social-Care-CPD/Views/Shared/_DetailedRole.cshtml +++ b/Childrens-Social-Care-CPD/Views/Shared/_DetailedRole.cshtml @@ -6,17 +6,17 @@ @functions { - public async Task RenderAccordianSection(string title, Document model) + public async Task RenderAccordianSection(string title, Document model, int id) {

- + @title

-
+
@{ await Html.RenderPartialAsync("_RichText", model); } @@ -71,27 +71,27 @@ @if (Model.WhatYoullDo != null) { - await RenderAccordianSection("What you'll do", Model.WhatYoullDo); + await RenderAccordianSection("What you'll do", Model.WhatYoullDo, 1); } @if (Model.SkillsAndKnowledge != null) { - await RenderAccordianSection("Skills and knowledge", Model.SkillsAndKnowledge); + await RenderAccordianSection("Skills and knowledge", Model.SkillsAndKnowledge, 2); } @if (Model.HowToBecomeOne != null) { - await RenderAccordianSection("How to become one", Model.HowToBecomeOne); + await RenderAccordianSection("How to become one", Model.HowToBecomeOne, 3); } @if (Model.CareerPathsAndProgression != null) { - await RenderAccordianSection("Career paths and progression", Model.CareerPathsAndProgression); + await RenderAccordianSection("Career paths and progression", Model.CareerPathsAndProgression, 4); } @if (Model.CurrentOpportunities != null) { - await RenderAccordianSection("Current opportunities", Model.CurrentOpportunities); + await RenderAccordianSection("Current opportunities", Model.CurrentOpportunities, 5); }
From 9e28074414743c3440f098085878073e855fc573 Mon Sep 17 00:00:00 2001 From: cairnsj <51908793+cairnsj@users.noreply.github.com> Date: Mon, 4 Sep 2023 15:37:43 +0100 Subject: [PATCH 2/2] fix: remove the noscript tag & implement the back link disabling using the js-enabled class from govuk --- Childrens-Social-Care-CPD/Views/Shared/_BackLink.cshtml | 2 +- Childrens-Social-Care-CPD/Views/Shared/_SiteLayout.cshtml | 1 - Childrens-Social-Care-CPD/styles/scss/application.scss | 3 ++- .../styles/scss/overrides/_site.scss | 7 +++++++ Childrens-Social-Care-CPD/wwwroot/css/application.css | 8 ++++++++ Childrens-Social-Care-CPD/wwwroot/css/application.css.map | 2 +- Childrens-Social-Care-CPD/wwwroot/css/application.min.css | 2 +- .../wwwroot/css/application.min.css.map | 2 +- 8 files changed, 21 insertions(+), 6 deletions(-) create mode 100644 Childrens-Social-Care-CPD/styles/scss/overrides/_site.scss diff --git a/Childrens-Social-Care-CPD/Views/Shared/_BackLink.cshtml b/Childrens-Social-Care-CPD/Views/Shared/_BackLink.cshtml index 37bec4e3..16f50df4 100644 --- a/Childrens-Social-Care-CPD/Views/Shared/_BackLink.cshtml +++ b/Childrens-Social-Care-CPD/Views/Shared/_BackLink.cshtml @@ -4,7 +4,7 @@ @if (Model == null) return; -
+