diff --git a/DigitalLearningSolutions.Web/ViewComponents/NumericInputViewComponent.cs b/DigitalLearningSolutions.Web/ViewComponents/NumericInputViewComponent.cs index 1703bc9752..2a4e652577 100644 --- a/DigitalLearningSolutions.Web/ViewComponents/NumericInputViewComponent.cs +++ b/DigitalLearningSolutions.Web/ViewComponents/NumericInputViewComponent.cs @@ -12,7 +12,8 @@ public IViewComponentResult Invoke( bool populateWithCurrentValue, string type, string hintText, - string cssClass + string cssClass, + bool required ) { var model = ViewData.Model; @@ -31,7 +32,8 @@ string cssClass type, errorMessages, string.IsNullOrEmpty(cssClass) ? null : cssClass, - string.IsNullOrEmpty(hintText) ? null : hintText + string.IsNullOrEmpty(hintText) ? null : hintText, + required ); return View(numericInputViewModel); } diff --git a/DigitalLearningSolutions.Web/ViewComponents/RadiosViewComponent.cs b/DigitalLearningSolutions.Web/ViewComponents/RadiosViewComponent.cs index 7f8250485f..940cdffb22 100644 --- a/DigitalLearningSolutions.Web/ViewComponents/RadiosViewComponent.cs +++ b/DigitalLearningSolutions.Web/ViewComponents/RadiosViewComponent.cs @@ -13,7 +13,8 @@ public IViewComponentResult Invoke( string label, IEnumerable radios, bool populateWithCurrentValues, - string? hintText + string? hintText, + bool required ) { var radiosList = radios.Select( @@ -29,7 +30,8 @@ public IViewComponentResult Invoke( aspFor, label, string.IsNullOrEmpty(hintText) ? null : hintText, - radiosList + radiosList, + required ); return View(viewModel); diff --git a/DigitalLearningSolutions.Web/ViewComponents/SelectListViewComponent.cs b/DigitalLearningSolutions.Web/ViewComponents/SelectListViewComponent.cs index 2ff75323c7..b4eb19cb8d 100644 --- a/DigitalLearningSolutions.Web/ViewComponents/SelectListViewComponent.cs +++ b/DigitalLearningSolutions.Web/ViewComponents/SelectListViewComponent.cs @@ -15,7 +15,7 @@ public IViewComponentResult Invoke( IEnumerable selectListOptions, string? hintText, string? cssClass, - bool? deselectable + bool required ) { var model = ViewData.Model; @@ -36,7 +36,7 @@ public IViewComponentResult Invoke( string.IsNullOrEmpty(hintText) ? null : hintText, errorMessage, hasError, - deselectable ?? false + required ); return View(selectListViewModel); } diff --git a/DigitalLearningSolutions.Web/ViewComponents/TextInputViewComponent.cs b/DigitalLearningSolutions.Web/ViewComponents/TextInputViewComponent.cs index 29738bcdab..b767f54680 100644 --- a/DigitalLearningSolutions.Web/ViewComponents/TextInputViewComponent.cs +++ b/DigitalLearningSolutions.Web/ViewComponents/TextInputViewComponent.cs @@ -17,6 +17,7 @@ public class TextInputViewComponent : ViewComponent /// Leave blank for no hint. /// Leave blank to set no autocomplete on the input element. /// + /// /// public IViewComponentResult Invoke( string aspFor, @@ -26,7 +27,8 @@ public IViewComponentResult Invoke( bool spellCheck, string hintText, string autocomplete, - string cssClass + string cssClass, + bool required ) { var model = ViewData.Model; @@ -47,7 +49,8 @@ string cssClass string.IsNullOrEmpty(autocomplete) ? null : autocomplete, errorMessages, string.IsNullOrEmpty(cssClass) ? null : cssClass, - string.IsNullOrEmpty(hintText) ? null : hintText + string.IsNullOrEmpty(hintText) ? null : hintText, + required ); return View(textBoxViewModel); } diff --git a/DigitalLearningSolutions.Web/ViewModels/Common/ViewComponents/NumericInputViewModel.cs b/DigitalLearningSolutions.Web/ViewModels/Common/ViewComponents/NumericInputViewModel.cs index 257a0b5682..37e105ac8e 100644 --- a/DigitalLearningSolutions.Web/ViewModels/Common/ViewComponents/NumericInputViewModel.cs +++ b/DigitalLearningSolutions.Web/ViewModels/Common/ViewComponents/NumericInputViewModel.cs @@ -15,7 +15,8 @@ public NumericInputViewModel( string type, IEnumerable errorMessages, string? cssClass = null, - string? hintText = null + string? hintText = null, + bool required = false ) { var errorMessageList = errorMessages.ToList(); @@ -23,12 +24,13 @@ public NumericInputViewModel( Id = id; Class = cssClass; Name = name; - Label = label; + Label = (!required && !label.EndsWith("(optional)") ? label + " (optional)" : label); Value = value; Type = type; HintText = hintText; ErrorMessages = errorMessageList; HasError = errorMessageList.Any(); + Required = required; } public string Id { get; set; } @@ -39,5 +41,6 @@ public NumericInputViewModel( public string Type { get; set; } public string? HintText { get; set; } public IEnumerable ErrorMessages { get; set; } + public bool Required { get; set; } } } diff --git a/DigitalLearningSolutions.Web/ViewModels/Common/ViewComponents/RadiosViewModel.cs b/DigitalLearningSolutions.Web/ViewModels/Common/ViewComponents/RadiosViewModel.cs index 757b9d93d8..274cbcba10 100644 --- a/DigitalLearningSolutions.Web/ViewModels/Common/ViewComponents/RadiosViewModel.cs +++ b/DigitalLearningSolutions.Web/ViewModels/Common/ViewComponents/RadiosViewModel.cs @@ -8,13 +8,15 @@ public RadiosViewModel( string aspFor, string label, string? hintText, - IEnumerable radios + IEnumerable radios, + bool required ) { AspFor = aspFor; - Label = label; + Label = (!required && !label.EndsWith("(optional)") ? label + " (optional)" : label); HintText = hintText; Radios = radios; + Required = required; } public string AspFor { get; set; } @@ -24,5 +26,6 @@ IEnumerable radios public string? HintText { get; set; } public IEnumerable Radios { get; set; } + public bool Required { get; set; } } } diff --git a/DigitalLearningSolutions.Web/ViewModels/Common/ViewComponents/SelectListViewModel.cs b/DigitalLearningSolutions.Web/ViewModels/Common/ViewComponents/SelectListViewModel.cs index 39f86a278d..de287ed817 100644 --- a/DigitalLearningSolutions.Web/ViewModels/Common/ViewComponents/SelectListViewModel.cs +++ b/DigitalLearningSolutions.Web/ViewModels/Common/ViewComponents/SelectListViewModel.cs @@ -17,20 +17,20 @@ public SelectListViewModel string? hintText = null, string? errorMessage = null, bool hasError = false, - bool deselectable = false + bool required = false ) { Id = id; Class = cssClass; Name = name; - Label = label; + Label = (!required && !label.EndsWith("(optional)") ? label + " (optional)" : label); Value = value; DefaultOption = defaultOption; SelectListOptions = selectListOptions; HintText = hintText; ErrorMessage = errorMessage; HasError = hasError; - Deselectable = deselectable; + Required = required; } public string Id { get; set; } @@ -43,6 +43,6 @@ public SelectListViewModel public string? HintText { get; set; } public string? ErrorMessage { get; set; } public bool HasError { get; set; } - public bool Deselectable { get; set; } + public bool Required { get; set; } } } diff --git a/DigitalLearningSolutions.Web/ViewModels/Common/ViewComponents/TextInputViewModel.cs b/DigitalLearningSolutions.Web/ViewModels/Common/ViewComponents/TextInputViewModel.cs index 72c97aefff..c293aa1942 100644 --- a/DigitalLearningSolutions.Web/ViewModels/Common/ViewComponents/TextInputViewModel.cs +++ b/DigitalLearningSolutions.Web/ViewModels/Common/ViewComponents/TextInputViewModel.cs @@ -15,7 +15,8 @@ public TextInputViewModel( string? autocomplete, IEnumerable errorMessages, string? cssClass = null, - string? hintText = null + string? hintText = null, + bool required = false ) { var errorMessageList = errorMessages.ToList(); @@ -23,12 +24,13 @@ public TextInputViewModel( Id = id; Class = cssClass; Name = name; - Label = label; + Label = (!required && !label.EndsWith("(optional)") ? label + " (optional)" : label); Value = value; Type = type; SpellCheck = spellCheck; Autocomplete = autocomplete; HintText = hintText; + Required = required; ErrorMessages = errorMessageList; HasError = errorMessageList.Any(); } @@ -42,6 +44,7 @@ public TextInputViewModel( public bool SpellCheck { get; set; } public string? Autocomplete { get; set; } public string? HintText { get; set; } + public bool Required { get; set; } public IEnumerable ErrorMessages { get; set; } public readonly bool HasError; } diff --git a/DigitalLearningSolutions.Web/Views/ChangePassword/Index.cshtml b/DigitalLearningSolutions.Web/Views/ChangePassword/Index.cshtml index 427ebca147..0f7884fa6d 100644 --- a/DigitalLearningSolutions.Web/Views/ChangePassword/Index.cshtml +++ b/DigitalLearningSolutions.Web/Views/ChangePassword/Index.cshtml @@ -29,7 +29,8 @@ spell-check="false" hint-text="" autocomplete="current-password" - css-class="nhsuk-u-width-one-half" /> + css-class="nhsuk-u-width-one-half" + required="true" /> + css-class="nhsuk-u-width-one-half" + required="true" /> + css-class="nhsuk-u-width-one-half" + required="true" /> diff --git a/DigitalLearningSolutions.Web/Views/LearningPortal/RecommendedLearning/_SearchableRecommendedResourceCard.cshtml b/DigitalLearningSolutions.Web/Views/LearningPortal/RecommendedLearning/_SearchableRecommendedResourceCard.cshtml index 72a75eee80..566ef49385 100644 --- a/DigitalLearningSolutions.Web/Views/LearningPortal/RecommendedLearning/_SearchableRecommendedResourceCard.cshtml +++ b/DigitalLearningSolutions.Web/Views/LearningPortal/RecommendedLearning/_SearchableRecommendedResourceCard.cshtml @@ -44,6 +44,7 @@ diff --git a/DigitalLearningSolutions.Web/Views/LearningPortal/SelfAssessments/SelfAssessmentCompetency.cshtml b/DigitalLearningSolutions.Web/Views/LearningPortal/SelfAssessments/SelfAssessmentCompetency.cshtml index 062a821072..24fe772e85 100644 --- a/DigitalLearningSolutions.Web/Views/LearningPortal/SelfAssessments/SelfAssessmentCompetency.cshtml +++ b/DigitalLearningSolutions.Web/Views/LearningPortal/SelfAssessments/SelfAssessmentCompetency.cshtml @@ -12,20 +12,20 @@
  • @(Model.VocabPlural()) home
  • @DisplayStringHelper.Ellipsis(Model.Competency?.Name, 30)
  • } -@section mobilebacklink -{ + @section mobilebacklink + {

    + asp-route-vocabulary="@Model.VocabPlural()" + asp-route-selfAssessmentId="@Model.Assessment.Id" + asp-route-competencyGroupId="@Model.Competency.CompetencyGroupID" + asp-fragment="comp-@Model.CompetencyNumber"> Back to @Model.VocabPlural()

    } - - + + @if (errorHasOccurred) { @@ -49,14 +49,14 @@ } else { -

    +

    @Model.Competency.Name

    @if (Model.Competency.Description != null) { -

    +

    @(Html.Raw(@Model.Competency.Description)) -

    +
    } } @@ -107,9 +107,9 @@
    @@ -145,8 +146,8 @@ {
    - +
    @@ -68,7 +70,7 @@
    - +
    diff --git a/DigitalLearningSolutions.Web/Views/TrackingSystem/Centre/Configuration/EditCentreManagerDetails.cshtml b/DigitalLearningSolutions.Web/Views/TrackingSystem/Centre/Configuration/EditCentreManagerDetails.cshtml index 085e46e5df..f3e1002e74 100644 --- a/DigitalLearningSolutions.Web/Views/TrackingSystem/Centre/Configuration/EditCentreManagerDetails.cshtml +++ b/DigitalLearningSolutions.Web/Views/TrackingSystem/Centre/Configuration/EditCentreManagerDetails.cshtml @@ -22,7 +22,8 @@ spell-check="false" autocomplete="given-name" hint-text="" - css-class="nhsuk-u-width-one-half" /> + css-class="nhsuk-u-width-one-half" + required="true"/> + css-class="nhsuk-u-width-one-half" + required="true" /> + css-class="nhsuk-u-width-one-half" + required="true" /> + css-class="nhsuk-u-width-one-half" + required="false"/> diff --git a/DigitalLearningSolutions.Web/Views/TrackingSystem/Centre/Configuration/EditCentreWebsiteDetails.cshtml b/DigitalLearningSolutions.Web/Views/TrackingSystem/Centre/Configuration/EditCentreWebsiteDetails.cshtml index 9ef1fee00f..dd5cd645b2 100644 --- a/DigitalLearningSolutions.Web/Views/TrackingSystem/Centre/Configuration/EditCentreWebsiteDetails.cshtml +++ b/DigitalLearningSolutions.Web/Views/TrackingSystem/Centre/Configuration/EditCentreWebsiteDetails.cshtml @@ -31,7 +31,8 @@ populate-with-current-value="true" type="text" spell-check="false" autocomplete="" hint-text="" - css-class="nhsuk-u-width-one-half" /> + css-class="nhsuk-u-width-one-half" + required="false" /> + css-class="nhsuk-u-width-one-half" + required="true" /> + css-class="nhsuk-u-width-one-half" + required="true" /> + css-class="nhsuk-u-width-one-half" + required="false" /> + css-class="nhsuk-u-width-one-half" + required="false" /> + css-class="nhsuk-u-width-one-half" + required="false" />
    diff --git a/DigitalLearningSolutions.Web/Views/TrackingSystem/Centre/Configuration/RegistrationPrompts/AddRegistrationPromptSelectPrompt.cshtml b/DigitalLearningSolutions.Web/Views/TrackingSystem/Centre/Configuration/RegistrationPrompts/AddRegistrationPromptSelectPrompt.cshtml index 57cf573bc8..61ec953324 100644 --- a/DigitalLearningSolutions.Web/Views/TrackingSystem/Centre/Configuration/RegistrationPrompts/AddRegistrationPromptSelectPrompt.cshtml +++ b/DigitalLearningSolutions.Web/Views/TrackingSystem/Centre/Configuration/RegistrationPrompts/AddRegistrationPromptSelectPrompt.cshtml @@ -19,7 +19,7 @@ label="Prompt name" value="@Model.CustomPromptId?.ToString()" hint-text="" - deselectable="false" + required="true" css-class="nhsuk-u-width-one-half" default-option="Select a prompt name" select-list-options="@ViewBag.CustomPromptNameOptions" /> diff --git a/DigitalLearningSolutions.Web/Views/TrackingSystem/Centre/Configuration/RegistrationPrompts/EditRegistrationPrompt.cshtml b/DigitalLearningSolutions.Web/Views/TrackingSystem/Centre/Configuration/RegistrationPrompts/EditRegistrationPrompt.cshtml index 5dbd4608d1..054b8c1eb0 100644 --- a/DigitalLearningSolutions.Web/Views/TrackingSystem/Centre/Configuration/RegistrationPrompts/EditRegistrationPrompt.cshtml +++ b/DigitalLearningSolutions.Web/Views/TrackingSystem/Centre/Configuration/RegistrationPrompts/EditRegistrationPrompt.cshtml @@ -60,7 +60,8 @@ spell-check="true" autocomplete="" hint-text="" - css-class="nhsuk-u-width-full" /> + css-class="nhsuk-u-width-full" + required="false" />
    diff --git a/DigitalLearningSolutions.Web/Views/TrackingSystem/Centre/Configuration/RegistrationPrompts/RemoveRegistrationPrompt.cshtml b/DigitalLearningSolutions.Web/Views/TrackingSystem/Centre/Configuration/RegistrationPrompts/RemoveRegistrationPrompt.cshtml index 5650a833f4..1533be46e8 100644 --- a/DigitalLearningSolutions.Web/Views/TrackingSystem/Centre/Configuration/RegistrationPrompts/RemoveRegistrationPrompt.cshtml +++ b/DigitalLearningSolutions.Web/Views/TrackingSystem/Centre/Configuration/RegistrationPrompts/RemoveRegistrationPrompt.cshtml @@ -50,8 +50,8 @@
    - - + + diff --git a/DigitalLearningSolutions.Web/Views/TrackingSystem/Centre/Ranking/Index.cshtml b/DigitalLearningSolutions.Web/Views/TrackingSystem/Centre/Ranking/Index.cshtml index 2f72c8ace7..9ae9733aea 100644 --- a/DigitalLearningSolutions.Web/Views/TrackingSystem/Centre/Ranking/Index.cshtml +++ b/DigitalLearningSolutions.Web/Views/TrackingSystem/Centre/Ranking/Index.cshtml @@ -27,7 +27,7 @@ label="Region" value="@Model.RegionId.ToString()" hint-text="" - deselectable="true" + required="false" css-class="nhsuk-u-width-full" default-option="All" select-list-options="@Model.RegionOptions" /> @@ -37,7 +37,7 @@ label="Period" value="@Model.Period?.Id.ToString()" hint-text="" - deselectable="true" + required="false" css-class="nhsuk-u-width-full" default-option="@null" select-list-options="@Model.PeriodOptions" /> diff --git a/DigitalLearningSolutions.Web/Views/TrackingSystem/Centre/Reports/EditFilters.cshtml b/DigitalLearningSolutions.Web/Views/TrackingSystem/Centre/Reports/EditFilters.cshtml index de4cc02a5b..fa28e27cc1 100644 --- a/DigitalLearningSolutions.Web/Views/TrackingSystem/Centre/Reports/EditFilters.cshtml +++ b/DigitalLearningSolutions.Web/Views/TrackingSystem/Centre/Reports/EditFilters.cshtml @@ -33,7 +33,7 @@ label="Choose job group filter" value="@Model.JobGroupId.ToString()" hint-text="" - deselectable="true" + required="false" css-class="nhsuk-u-width-one-half" default-option="All" select-list-options="@Model.JobGroupOptions" /> @@ -57,7 +57,7 @@ label="Report by" value="@reportIntervalValue.ToString()" hint-text="" - deselectable="false" + required="true" css-class="nhsuk-u-width-one-half" default-option="" select-list-options="@Model.ReportIntervalOptions" /> diff --git a/DigitalLearningSolutions.Web/Views/TrackingSystem/Centre/Reports/_EditCourseCategoryFilters.cshtml b/DigitalLearningSolutions.Web/Views/TrackingSystem/Centre/Reports/_EditCourseCategoryFilters.cshtml index 7302b550fd..2464aadf4d 100644 --- a/DigitalLearningSolutions.Web/Views/TrackingSystem/Centre/Reports/_EditCourseCategoryFilters.cshtml +++ b/DigitalLearningSolutions.Web/Views/TrackingSystem/Centre/Reports/_EditCourseCategoryFilters.cshtml @@ -36,7 +36,7 @@ label="Choose a course" value="@Model.CustomisationId.ToString()" hint-text="" - deselectable="true" + required="false" css-class="nhsuk-u-width-one-half" default-option="All" select-list-options="@Model.CustomisationOptions" /> @@ -61,7 +61,7 @@ label="Choose course category from the list below" value="@Model.CourseCategoryId.ToString()" hint-text="" - deselectable="true" + required="false" css-class="nhsuk-u-width-one-half" default-option="All" select-list-options="@Model.CourseCategoryOptions" /> @@ -75,7 +75,7 @@ label="Choose a course filter" value="@Model.CustomisationId.ToString()" hint-text="" - deselectable="true" + required="false" css-class="nhsuk-u-width-one-half" default-option="All" select-list-options="@Model.CustomisationOptions" /> diff --git a/DigitalLearningSolutions.Web/Views/TrackingSystem/CourseSetup/AdminFields/AddAdminField.cshtml b/DigitalLearningSolutions.Web/Views/TrackingSystem/CourseSetup/AdminFields/AddAdminField.cshtml index e24c9176c2..d674418b1a 100644 --- a/DigitalLearningSolutions.Web/Views/TrackingSystem/CourseSetup/AdminFields/AddAdminField.cshtml +++ b/DigitalLearningSolutions.Web/Views/TrackingSystem/CourseSetup/AdminFields/AddAdminField.cshtml @@ -23,7 +23,7 @@ label="Field name" value="@Model.AdminFieldId.ToString()" hint-text="" - deselectable="false" + required="true" css-class="nhsuk-u-width-one-half" default-option="Select a field name" select-list-options="@ViewBag.AdminFieldNameOptions" /> @@ -49,7 +49,8 @@ spell-check="true" autocomplete="" hint-text="" - css-class="nhsuk-u-width-full" /> + css-class="nhsuk-u-width-full" + required="false" /> diff --git a/DigitalLearningSolutions.Web/Views/TrackingSystem/CourseSetup/AdminFields/EditAdminField.cshtml b/DigitalLearningSolutions.Web/Views/TrackingSystem/CourseSetup/AdminFields/EditAdminField.cshtml index 728b444916..c79f9698c5 100644 --- a/DigitalLearningSolutions.Web/Views/TrackingSystem/CourseSetup/AdminFields/EditAdminField.cshtml +++ b/DigitalLearningSolutions.Web/Views/TrackingSystem/CourseSetup/AdminFields/EditAdminField.cshtml @@ -44,7 +44,8 @@ spell-check="true" autocomplete="" hint-text="" - css-class="nhsuk-u-width-full" /> + css-class="nhsuk-u-width-full" + required="false" /> diff --git a/DigitalLearningSolutions.Web/Views/TrackingSystem/CourseSetup/ManageCourse/EditAutoRefreshOptions.cshtml b/DigitalLearningSolutions.Web/Views/TrackingSystem/CourseSetup/ManageCourse/EditAutoRefreshOptions.cshtml index 265791820f..2f16c41054 100644 --- a/DigitalLearningSolutions.Web/Views/TrackingSystem/CourseSetup/ManageCourse/EditAutoRefreshOptions.cshtml +++ b/DigitalLearningSolutions.Web/Views/TrackingSystem/CourseSetup/ManageCourse/EditAutoRefreshOptions.cshtml @@ -30,7 +30,7 @@ label="Course to refresh to" value="@Model.RefreshToCustomisationId.ToString()" hint-text="Which course should the learner be enrolled on when auto-refreshing?" - deselectable="false" + required="true" css-class="nhsuk-u-width-one-half" default-option="Select a course" select-list-options="@Model.CourseOptions" /> @@ -40,7 +40,8 @@ populate-with-current-value="true" type="text" hint-text="How many months prior to expiry of the previous course should the learner be enrolled on the refresher course?" - css-class="nhsuk-input--width-10" /> + css-class="nhsuk-input--width-10" + required="false"/> + css-class="nhsuk-input--width-10" + required="false"/> + css-class="nhsuk-input--width-10 nhsuk-u-margin-bottom-2" + required="false" /> + css-class="nhsuk-u-width-three-quarters nhsuk-u-font-weight-normal" + required="false"/> diff --git a/DigitalLearningSolutions.Web/Views/TrackingSystem/CourseSetup/Shared/_EditCoursePasswordAndEmail.cshtml b/DigitalLearningSolutions.Web/Views/TrackingSystem/CourseSetup/Shared/_EditCoursePasswordAndEmail.cshtml index 58700f4af4..3f066e8034 100644 --- a/DigitalLearningSolutions.Web/Views/TrackingSystem/CourseSetup/Shared/_EditCoursePasswordAndEmail.cshtml +++ b/DigitalLearningSolutions.Web/Views/TrackingSystem/CourseSetup/Shared/_EditCoursePasswordAndEmail.cshtml @@ -34,7 +34,8 @@ spell-check="false" autocomplete="off" hint-text="" - css-class="nhsuk-u-width-one-half" /> + css-class="nhsuk-u-width-one-half" + required="true" /> @@ -57,7 +58,8 @@ spell-check="false" autocomplete="off" hint-text="" - css-class="nhsuk-u-width-one-half" /> + css-class="nhsuk-u-width-one-half" + required="true" /> diff --git a/DigitalLearningSolutions.Web/Views/TrackingSystem/CourseSetup/Shared/_OtherCompletionCriteriaInputs.cshtml b/DigitalLearningSolutions.Web/Views/TrackingSystem/CourseSetup/Shared/_OtherCompletionCriteriaInputs.cshtml index 0c00146cc2..dae6dde8f5 100644 --- a/DigitalLearningSolutions.Web/Views/TrackingSystem/CourseSetup/Shared/_OtherCompletionCriteriaInputs.cshtml +++ b/DigitalLearningSolutions.Web/Views/TrackingSystem/CourseSetup/Shared/_OtherCompletionCriteriaInputs.cshtml @@ -6,7 +6,8 @@ populate-with-current-value="true" type="text" hint-text="" - css-class="nhsuk-input--width-10 nhsuk-u-margin-bottom-2" /> + css-class="nhsuk-input--width-10 nhsuk-u-margin-bottom-2" + required="false" /> @if (Model.DiagAssess) { + css-class="nhsuk-input--width-10 nhsuk-u-margin-bottom-2" + required="false"/> } diff --git a/DigitalLearningSolutions.Web/Views/TrackingSystem/Delegates/DelegateGroups/AddDelegateGroup.cshtml b/DigitalLearningSolutions.Web/Views/TrackingSystem/Delegates/DelegateGroups/AddDelegateGroup.cshtml index 1375abd23d..2cc02eafbb 100644 --- a/DigitalLearningSolutions.Web/Views/TrackingSystem/Delegates/DelegateGroups/AddDelegateGroup.cshtml +++ b/DigitalLearningSolutions.Web/Views/TrackingSystem/Delegates/DelegateGroups/AddDelegateGroup.cshtml @@ -31,7 +31,8 @@ spell-check="true" hint-text="" autocomplete="" - css-class="nhsuk-u-width-two-thirds" /> + css-class="nhsuk-u-width-two-thirds" + required="true" /> + css-class="nhsuk-u-width-one-half" + required="true" /> diff --git a/DigitalLearningSolutions.Web/Views/TrackingSystem/Delegates/DelegateGroups/GenerateGroups.cshtml b/DigitalLearningSolutions.Web/Views/TrackingSystem/Delegates/DelegateGroups/GenerateGroups.cshtml index a6a10b3637..3191294b9b 100644 --- a/DigitalLearningSolutions.Web/Views/TrackingSystem/Delegates/DelegateGroups/GenerateGroups.cshtml +++ b/DigitalLearningSolutions.Web/Views/TrackingSystem/Delegates/DelegateGroups/GenerateGroups.cshtml @@ -23,7 +23,7 @@ label="Registration field" value="@Model.RegistrationFieldOptionId.ToString()" hint-text="This is the delegate registration field that the group generation will be based on." - deselectable="false" + required="true" css-class="nhsuk-u-width-full nhsuk-u-margin-bottom-2" default-option="Select a registration field" select-list-options="@Model.RegistrationFieldOptions" /> diff --git a/DigitalLearningSolutions.Web/Views/TrackingSystem/Delegates/DelegateProgress/EditDelegateCourseAdminField.cshtml b/DigitalLearningSolutions.Web/Views/TrackingSystem/Delegates/DelegateProgress/EditDelegateCourseAdminField.cshtml index 33dff16097..0988a9119d 100644 --- a/DigitalLearningSolutions.Web/Views/TrackingSystem/Delegates/DelegateProgress/EditDelegateCourseAdminField.cshtml +++ b/DigitalLearningSolutions.Web/Views/TrackingSystem/Delegates/DelegateProgress/EditDelegateCourseAdminField.cshtml @@ -64,7 +64,8 @@ spell-check="true" autocomplete="" hint-text="Answer must be 100 characters or fewer." - css-class="nhsuk-u-width-full" /> + css-class="nhsuk-u-width-full" + required="false" /> } diff --git a/DigitalLearningSolutions.Web/Views/TrackingSystem/Delegates/DelegateProgress/EditSupervisor.cshtml b/DigitalLearningSolutions.Web/Views/TrackingSystem/Delegates/DelegateProgress/EditSupervisor.cshtml index 666f285232..a1321937b7 100644 --- a/DigitalLearningSolutions.Web/Views/TrackingSystem/Delegates/DelegateProgress/EditSupervisor.cshtml +++ b/DigitalLearningSolutions.Web/Views/TrackingSystem/Delegates/DelegateProgress/EditSupervisor.cshtml @@ -33,7 +33,7 @@ label="Supervisor" value="@Model.SupervisorId.ToString()" hint-text="" - deselectable="true" + required="false" css-class="nhsuk-u-width-one-half" default-option="No supervisor" select-list-options="@Model.Supervisors" /> diff --git a/DigitalLearningSolutions.Web/Views/TrackingSystem/Delegates/EditDelegate/Index.cshtml b/DigitalLearningSolutions.Web/Views/TrackingSystem/Delegates/EditDelegate/Index.cshtml index d352854f2b..a00f8021b7 100644 --- a/DigitalLearningSolutions.Web/Views/TrackingSystem/Delegates/EditDelegate/Index.cshtml +++ b/DigitalLearningSolutions.Web/Views/TrackingSystem/Delegates/EditDelegate/Index.cshtml @@ -43,7 +43,8 @@ spell-check="false" autocomplete="given-name" hint-text="" - css-class="nhsuk-u-width-one-half" /> + css-class="nhsuk-u-width-one-half" + required="true" /> + css-class="nhsuk-u-width-one-half" + required="true" /> + css-class="nhsuk-u-width-one-half" + required="true" /> + css-class="nhsuk-u-width-one-half" + required="false" /> @@ -79,7 +83,7 @@ label="Job group" value="@Model.JobGroupId.ToString()" hint-text="" - deselectable="false" + required="true" css-class="nhsuk-u-width-one-half" default-option="Select a job group" select-list-options="@Model.JobGroups" /> @@ -90,7 +94,7 @@ label="@(customField.Prompt + (customField.Mandatory ? "" : " (optional)"))" value="@customField.Answer" hint-text="" - deselectable="@(!customField.Mandatory)" + required="@(customField.Mandatory)" css-class="nhsuk-u-width-one-half" default-option="Select a @customField.Prompt.ToLower()" select-list-options="@customField.Options" /> @@ -102,7 +106,8 @@ spell-check="false" autocomplete="" hint-text="" - css-class="nhsuk-u-width-one-half" /> + css-class="nhsuk-u-width-one-half" + required="@customField.Mandatory" /> } } diff --git a/DigitalLearningSolutions.Web/Views/TrackingSystem/Delegates/GroupCourses/AddCourseToGroup.cshtml b/DigitalLearningSolutions.Web/Views/TrackingSystem/Delegates/GroupCourses/AddCourseToGroup.cshtml index 436eefc105..dec9b51894 100644 --- a/DigitalLearningSolutions.Web/Views/TrackingSystem/Delegates/GroupCourses/AddCourseToGroup.cshtml +++ b/DigitalLearningSolutions.Web/Views/TrackingSystem/Delegates/GroupCourses/AddCourseToGroup.cshtml @@ -30,17 +30,18 @@ label="Supervisor" value="@Model.SupervisorId.ToString()" hint-text="" - deselectable="true" css-class="nhsuk-u-width-one-half" default-option="No supervisor" - select-list-options="@Model.Supervisors" /> + select-list-options="@Model.Supervisors" + required="false"/> + css-class="nhsuk-u-width-one-half" + required="false"/> Back diff --git a/DigitalLearningSolutions.Web/Views/TrackingSystem/Delegates/PromoteToAdmin/Index.cshtml b/DigitalLearningSolutions.Web/Views/TrackingSystem/Delegates/PromoteToAdmin/Index.cshtml index d0ec66ac8c..896af2d10d 100644 --- a/DigitalLearningSolutions.Web/Views/TrackingSystem/Delegates/PromoteToAdmin/Index.cshtml +++ b/DigitalLearningSolutions.Web/Views/TrackingSystem/Delegates/PromoteToAdmin/Index.cshtml @@ -55,7 +55,8 @@ label="Please select a content manager role for this user." populate-with-current-values="true" radios="@Model.Radios" - hint-text="" /> + hint-text="" + required="true" />

    Learning category

    @@ -64,7 +65,7 @@ label="Learning category" value="@Model.LearningCategory.ToString()" hint-text="Limits the permissions of the administrator to view and manage courses in a particular category." - deselectable="true" + required="false" css-class="nhsuk-u-width-one-half" default-option="" select-list-options="@Model.LearningCategories" /> diff --git a/DigitalLearningSolutions.Web/Views/TrackingSystem/Delegates/SetDelegatePassword/Index.cshtml b/DigitalLearningSolutions.Web/Views/TrackingSystem/Delegates/SetDelegatePassword/Index.cshtml index ab627ffa1a..f9e35311e4 100644 --- a/DigitalLearningSolutions.Web/Views/TrackingSystem/Delegates/SetDelegatePassword/Index.cshtml +++ b/DigitalLearningSolutions.Web/Views/TrackingSystem/Delegates/SetDelegatePassword/Index.cshtml @@ -28,7 +28,8 @@ spell-check="false" autocomplete="off" hint-text="Password should have a minimum of 8 characters with at least 1 letter, 1 number and 1 symbol." - css-class="nhsuk-u-width-one-half" /> + css-class="nhsuk-u-width-one-half" + required="true" />