-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixes optional competencies page markup and styling
- Loading branch information
1 parent
39c6442
commit e952060
Showing
2 changed files
with
62 additions
and
67 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,11 +8,7 @@ | |
ViewData["SelfAssessmentTitle"] = @Model.SelfAssessment.Name; | ||
var backLinkData = Html.GetRouteValues(); | ||
} | ||
<style> | ||
.nhsuk-details__summary-text { | ||
padding: 10px; | ||
} | ||
</style> | ||
|
||
@if (ViewBag.FromAddOptionalPage != null) | ||
{ | ||
@section breadcrumbs { | ||
|
@@ -62,14 +58,12 @@ else | |
} | ||
|
||
<link rel="stylesheet" href="@Url.Content("~/css/learningPortal/selfAssessment.css")" asp-append-version="true"> | ||
<h1>Choose optional @Model.VocabPlural().ToLower()</h1> | ||
<h1>Optional @Model.VocabPlural().ToLower()</h1> | ||
@if (errorHasOccurred) | ||
{ | ||
<vc:error-summary order-of-property-names="@(new[] { nameof(Model.IncludedSelfAssessmentStructureIds) })" /> | ||
} | ||
<h2> | ||
<small>Which optional @Model.VocabPlural().ToLower() would you like to include in your self-assessment?</small> | ||
</h2> | ||
|
||
@if (Model.SelfAssessment.ManageOptionalCompetenciesPrompt != null) | ||
{ | ||
<div class="nhsuk-warning-callout"> | ||
|
@@ -82,68 +76,68 @@ else | |
<div>@Html.Raw(Model.SelfAssessment.ManageOptionalCompetenciesPrompt)</div> | ||
</div> | ||
} | ||
<h2> | ||
Select your optional @Model.VocabPlural().ToLower() | ||
</h2> | ||
<form method="post"> | ||
<nhs-form-group nhs-validation-for="IncludedSelfAssessmentStructureIds"> | ||
@foreach (var competencyGroup in Model.CompetencyGroups) | ||
{ | ||
<fieldset class="nhsuk-fieldset nhsuk-u-margin-bottom-4"> | ||
|
||
@if (competencyGroup.Count() > 1) | ||
|
||
@if (competencyGroup.Count() > 1) | ||
{ | ||
@if (competencyGroup.Any(x => x.GroupOptionalCompetencies)) | ||
{ | ||
@if (competencyGroup.Any(x => x.GroupOptionalCompetencies)) | ||
{ | ||
|
||
<div class="nhsuk-checkboxes__item"> | ||
<input data-group="@competencyGroup.Key" class="nhsuk-checkboxes__input" id="[email protected]" name="groupOptionalCompetenciesChecked" checked="@(competencyGroup.Any(x => x.IncludedInSelfAssessment == true) ? true : false)" type="checkbox" value="@competencyGroup.Key"> | ||
<label class="nhsuk-label nhsuk-checkboxes__label nhsuk-u-font-size-16" for="[email protected]"> | ||
<legend class="nhsuk-fieldset__legend nhsuk-fieldset__legend--l"> | ||
<span class="nhsuk-fieldset__heading"> | ||
@competencyGroup.Key | ||
|
||
<div class="nhsuk-checkboxes__item nhsuk-u-margin-bottom-6"> | ||
<input data-group="@competencyGroup.Key" class="nhsuk-checkboxes__input" id="[email protected]" name="groupOptionalCompetenciesChecked" checked="@(competencyGroup.Any(x => x.IncludedInSelfAssessment == true) ? true : false)" type="checkbox" value="@competencyGroup.Key"> | ||
<label class="nhsuk-label nhsuk-checkboxes__label heading-checkboxes__label" for="[email protected]" aria-details="@competencyGroup.Key-details"> | ||
<h3> | ||
@competencyGroup.Key | ||
</h3> | ||
</label> | ||
<div class="nhsuk-checkboxes__description" id="@competencyGroup.Key-details"> | ||
<details class="nhsuk-details"> | ||
<summary class="nhsuk-details__summary"> | ||
<span class="nhsuk-details__summary-text"> | ||
What’s included in the <span class="nhsuk-u-visually-hidden"> @competencyGroup.Key </span>group | ||
</span> | ||
</legend> | ||
</label> | ||
</summary> | ||
|
||
<div class="nhsuk-details__text"> | ||
<ul> | ||
|
||
@foreach (var competency in competencyGroup) | ||
{ | ||
<li> | ||
|
||
|
||
@foreach (var flag in competency.CompetencyFlags) | ||
{ | ||
<span class="nhsuk-u-padding-right-2 @(ViewData["cssClass"]?.ToString())"> | ||
<strong class="nhsuk-tag @flag.FlagTagClass"> | ||
@flag.FlagName | ||
</strong> | ||
</span> | ||
} | ||
@competency.Name | ||
</li> | ||
} | ||
</ul> | ||
</div> | ||
</details> | ||
</div> | ||
<details class="nhsuk-details"> | ||
<summary class="nhsuk-details__summary nhsuk-u-padding-0"> | ||
<h3 class="nhsuk-details__summary-text nhsuk-u-margin-bottom-0"> | ||
<span class="nhsuk-u-margin-bottom-0"> | ||
<span class="nhsuk-details__summary-text" id="@competencyGroup.Key"> | ||
What’s included in the @competencyGroup.Key | ||
</span> | ||
</span> | ||
</div> | ||
|
||
</h3> | ||
</summary> | ||
|
||
<div class="nhsuk-details__text nhsuk-card"> | ||
<dl class="nhsuk-summary-list"> | ||
|
||
@foreach (var competency in competencyGroup) | ||
{ <div class="nhsuk-summary-list__row"> | ||
|
||
<dd class="nhsuk-summary-list__value"> | ||
@foreach (var flag in competency.CompetencyFlags) | ||
{ | ||
<span class="nhsuk-u-padding-right-2 @(ViewData["cssClass"]?.ToString())"> | ||
<strong class="nhsuk-tag @flag.FlagTagClass"> | ||
@flag.FlagName | ||
</strong> | ||
</span> | ||
} | ||
@competency.Name | ||
</dd> | ||
</div> | ||
} | ||
</dl> | ||
</div> | ||
</details> | ||
} | ||
else | ||
{ | ||
<legend class="nhsuk-fieldset__legend nhsuk-fieldset__legend--l"> | ||
<span class="nhsuk-fieldset__heading"> | ||
} | ||
else | ||
{ | ||
<fieldset class="nhsuk-fieldset nhsuk-u-margin-bottom-6"> | ||
<legend class="nhsuk-fieldset__legend"> | ||
<h3> | ||
@competencyGroup.Key | ||
</span> | ||
</h3> | ||
</legend> | ||
<div class="nhsuk-checkboxes"> | ||
@foreach (var competency in competencyGroup) | ||
|
@@ -166,9 +160,10 @@ else | |
|
||
} | ||
</div> | ||
} | ||
</fieldset> | ||
} | ||
</fieldset> | ||
} | ||
|
||
} | ||
</nhs-form-group> | ||
<button class="nhsuk-button" type="submit">Submit</button> | ||
|