|
1 | 1 | @using DigitalLearningSolutions.Web.ViewModels.Frameworks; |
2 | 2 | @model FrameworkCompetencyViewModel; |
3 | 3 | @{ |
4 | | - ViewData["Title"] = !string.IsNullOrWhiteSpace(Model.VocabSingular()) ? Model.VocabSingular(): "Competency"; |
5 | | - ViewData["Application"] = "Framework Service"; |
6 | | - ViewData["HeaderPathName"] = "Framework Service"; |
| 4 | + ViewData["Title"] = !string.IsNullOrWhiteSpace(Model.VocabSingular()) ? Model.VocabSingular() : "Competency"; |
| 5 | + ViewData["Application"] = "Framework Service"; |
| 6 | + ViewData["HeaderPathName"] = "Framework Service"; |
7 | 7 | } |
8 | 8 | <link rel="stylesheet" href="@Url.Content("~/css/frameworks/frameworksShared.css")" asp-append-version="true"> |
9 | 9 | <link rel="stylesheet" href="@Url.Content("~/css/jodit.css")" asp-append-version="true"> |
10 | 10 | @section NavMenuItems { |
11 | | - <partial name="Shared/_NavMenuItems" /> |
| 11 | + <partial name="Shared/_NavMenuItems" /> |
12 | 12 | } |
13 | | - @section NavBreadcrumbs { |
14 | | - <nav class="nhsuk-breadcrumb" aria-label="Breadcrumb"> |
15 | | - <div class="nhsuk-width-container"> |
16 | | - <ol class="nhsuk-breadcrumb__list"> |
17 | | - <li class="nhsuk-breadcrumb__item"><a class="nhsuk-breadcrumb__link trigger-loader" asp-action="ViewFrameworks" asp-route-tabname="Mine">Frameworks</a></li> |
18 | | - < li class= "nhsuk-breadcrumb__item">< a class= "nhsuk-breadcrumb__link trigger-loader" asp-action= "ViewFramework" asp-route-frameworkCompetencyGroupId= "@Model.FrameworkCompetencyGroupId" asp-fragment= "[email protected]" asp-route-frameworkId= "@Model.DetailFramework.ID" asp-route-tabname= "Structure"> Framework Structure</ a></ li> |
19 | | - <li class="nhsuk-breadcrumb__item">@Model.VocabSingular()</li> |
20 | | - </ol> |
| 13 | +@section NavBreadcrumbs { |
| 14 | + <nav class="nhsuk-breadcrumb" aria-label="Breadcrumb"> |
| 15 | + <div class="nhsuk-width-container"> |
| 16 | + <ol class="nhsuk-breadcrumb__list"> |
| 17 | + <li class="nhsuk-breadcrumb__item"><a class="nhsuk-breadcrumb__link trigger-loader" asp-action="ViewFrameworks" asp-route-tabname="Mine">Frameworks</a></li> |
| 18 | + < li class= "nhsuk-breadcrumb__item">< a class= "nhsuk-breadcrumb__link trigger-loader" asp-action= "ViewFramework" asp-route-frameworkCompetencyGroupId= "@Model.FrameworkCompetencyGroupId" asp-fragment= "[email protected]" asp-route-frameworkId= "@Model.DetailFramework.ID" asp-route-tabname= "Structure"> Framework Structure</ a></ li> |
| 19 | + <li class="nhsuk-breadcrumb__item">@Model.VocabSingular()</li> |
| 20 | + </ol> |
21 | 21 | < p class= "nhsuk-breadcrumb__back">< a class= "nhsuk-breadcrumb__backlink" asp-action= "ViewFramework" asp-route-frameworkCompetencyGroupId= "@Model.FrameworkCompetencyGroupId" asp-fragment= "[email protected]" asp-route-frameworkId= "@Model.DetailFramework.ID" asp-route-tabname= "Structure"> Back to framework structure</ a></ p> |
22 | | - </div> |
23 | | - </nav> |
| 22 | + </div> |
| 23 | + </nav> |
24 | 24 | } |
25 | | - <div class="nhsuk-grid-row"> |
| 25 | +<div class="nhsuk-grid-row"> |
26 | 26 |
|
27 | 27 | <div class="nhsuk-grid-column-full"> |
28 | | - @if (Model.FrameworkCompetency.Id > 0) |
29 | | - { |
30 | | - <h1> |
31 | | - Edit @Model.VocabSingular().ToLower() |
32 | | - </h1> |
33 | | - } |
34 | | - else |
35 | | - { |
36 | | - <h1> |
37 | | - Add new @Model.VocabSingular().ToLower() |
38 | | - </h1> |
39 | | - } |
40 | | - @if (Model.DetailFramework.PublishStatusID == 3) |
41 | | - { |
42 | | - <partial name="Shared/_PublishedWarning" /> |
43 | | - } |
44 | | - <form method="post"> |
45 | | - @if (!ViewData.ModelState.IsValid) |
46 | | - { |
47 | | - <partial name="_ErrorSummary" /> |
48 | | - } |
49 | | - <nhs-form-group nhs-validation-for="FrameworkCompetency.Name"> |
50 | | - <label class="nhsuk-label" id="competency-name-label" for="competency-name"> |
51 | | - @Model.VocabSingular() statement |
52 | | - </label> |
53 | | - <span nhs-validation-for="FrameworkCompetency.Name"></span> |
54 | | - <input class="nhsuk-input" asp-for="FrameworkCompetency.Name" id="Name" name="Name" type="text" error-class-toggle="nhsuk-input--error" aria-describedby="competency-name-label"> |
55 | | - </nhs-form-group> |
56 | | - <div class="nhsuk-form-group"> |
57 | | - <vc:text-area asp-for="FrameworkCompetency.Description" |
58 | | - label="@Model.VocabSingular() description" |
59 | | - populate-with-current-value="true" |
60 | | - rows="5" |
61 | | - spell-check="false" |
62 | | - hint-text="" |
63 | | - css-class="html-editor" |
64 | | - character-count="null" |
65 | | - populate-with-current-value="true" /> |
66 | | - </div> |
67 | | - @if (Model.CompetencyFlags?.Count() > 0) |
68 | | - { |
69 | | - <div class="nhsuk-form-group"> |
70 | | - <label class="nhsuk-label nhsuk-u-margin-bottom-2" id="competency-description-label" for="competency-description"> |
71 | | - @Model.VocabSingular() tags |
72 | | - </label> |
73 | | - @foreach (var flag in Model.CompetencyFlags) |
74 | | - { |
75 | | - <div class="nhsuk-checkboxes__item"> |
76 | | - <input class="nhsuk-checkboxes__input" name="selectedFlagIds" type="checkbox" value="@flag.FlagId" @(flag.Selected ? "checked" : string.Empty) /> |
77 | | - <label class="nhsuk-label nhsuk-checkboxes__label"> |
78 | | - @flag.FlagName |
79 | | - </label> |
| 28 | + @if (Model.FrameworkCompetency.Id > 0) |
| 29 | + { |
| 30 | + <h1> |
| 31 | + Edit @Model.VocabSingular().ToLower() |
| 32 | + </h1> |
| 33 | + } |
| 34 | + else |
| 35 | + { |
| 36 | + <h1> |
| 37 | + Add new @Model.VocabSingular().ToLower() |
| 38 | + </h1> |
| 39 | + } |
| 40 | + @if (Model.DetailFramework.PublishStatusID == 3) |
| 41 | + { |
| 42 | + <partial name="Shared/_PublishedWarning" /> |
| 43 | + } |
| 44 | + <form method="post"> |
| 45 | + @if (!ViewData.ModelState.IsValid) |
| 46 | + { |
| 47 | + <partial name="_ErrorSummary" /> |
| 48 | + } |
| 49 | + <nhs-form-group nhs-validation-for="FrameworkCompetency.Name"> |
| 50 | + <label class="nhsuk-label" id="competency-name-label" for="name"> |
| 51 | + @Model.VocabSingular() statement |
| 52 | + </label> |
| 53 | + <span nhs-validation-for="FrameworkCompetency.Name"></span> |
| 54 | + <input class="nhsuk-input" asp-for="FrameworkCompetency.Name" id="Name" name="Name" type="text" error-class-toggle="nhsuk-input--error" aria-describedby="competency-name-label"> |
| 55 | + </nhs-form-group> |
| 56 | + <div class="nhsuk-form-group"> |
| 57 | + <vc:text-area asp-for="FrameworkCompetency.Description" |
| 58 | + label="@Model.VocabSingular() description" |
| 59 | + populate-with-current-value="true" |
| 60 | + rows="5" |
| 61 | + spell-check="false" |
| 62 | + hint-text="" |
| 63 | + css-class="html-editor" |
| 64 | + character-count="null" |
| 65 | + populate-with-current-value="true" /> |
80 | 66 | </div> |
81 | | - } |
82 | | - </div> |
83 | | - } |
| 67 | + @if (Model.CompetencyFlags?.Count() > 0) |
| 68 | + { |
| 69 | + <div class="nhsuk-form-group"> |
| 70 | + <label class="nhsuk-label nhsuk-u-margin-bottom-2" id="competency-description-label" for="competency-description"> |
| 71 | + @Model.VocabSingular() tags |
| 72 | + </label> |
| 73 | + @foreach (var flag in Model.CompetencyFlags) |
| 74 | + { |
| 75 | + <div class="nhsuk-checkboxes__item"> |
| 76 | + <input class="nhsuk-checkboxes__input" name="selectedFlagIds" type="checkbox" value="@flag.FlagId" @(flag.Selected ? "checked" : string.Empty) /> |
| 77 | + <label class="nhsuk-label nhsuk-checkboxes__label"> |
| 78 | + @flag.FlagName |
| 79 | + </label> |
| 80 | + </div> |
| 81 | + } |
| 82 | + </div> |
| 83 | + } |
84 | 84 |
|
85 | | - <input name="Id" type="hidden" asp-for="FrameworkCompetency.Id" /> |
86 | | - <input name="CompetencyID" type="hidden" asp-for="FrameworkCompetency.CompetencyID" /> |
87 | | - <input name="Ordering" type="hidden" asp-for="FrameworkCompetency.Ordering" /> |
| 85 | + <input name="Id" type="hidden" asp-for="FrameworkCompetency.Id" /> |
| 86 | + <input name="CompetencyID" type="hidden" asp-for="FrameworkCompetency.CompetencyID" /> |
| 87 | + <input name="Ordering" type="hidden" asp-for="FrameworkCompetency.Ordering" /> |
88 | 88 |
|
89 | | - <button class="nhsuk-button" type="submit"> |
90 | | - Save |
91 | | - </button> |
92 | | - <div class="nhsuk-back-link"> |
93 | | - < a class= "nhsuk-back-link__link" asp-action= "ViewFramework" asp-route-frameworkCompetencyGroupId= "@Model.FrameworkCompetencyGroupId" asp-fragment= "[email protected]" asp-route-frameworkId= "@Model.DetailFramework.ID" asp-route-tabname= "Structure"> |
94 | | - <svg class="nhsuk-icon nhsuk-icon__chevron-left" focusable='false' xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" aria-hidden="true" focusable="false"> |
95 | | - <path d="M13.41 12l5.3-5.29a1 1 0 1 0-1.42-1.42L12 10.59l-5.29-5.3a1 1 0 0 0-1.42 1.42l5.3 5.29-5.3 5.29a1 1 0 0 0 0 1.42 1 1 0 0 0 1.42 0l5.29-5.3 5.29 5.3a1 1 0 0 0 1.42 0 1 1 0 0 0 0-1.42z"></path> |
96 | | - </svg> |
97 | | - Cancel |
98 | | - </a> |
99 | | - </div> |
100 | | - </form> |
101 | | - </div> |
| 89 | + <button class="nhsuk-button" type="submit"> |
| 90 | + Save |
| 91 | + </button> |
| 92 | + <div class="nhsuk-back-link"> |
| 93 | + < a class= "nhsuk-back-link__link" asp-action= "ViewFramework" asp-route-frameworkCompetencyGroupId= "@Model.FrameworkCompetencyGroupId" asp-fragment= "[email protected]" asp-route-frameworkId= "@Model.DetailFramework.ID" asp-route-tabname= "Structure"> |
| 94 | + <svg class="nhsuk-icon nhsuk-icon__chevron-left" focusable='false' xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" aria-hidden="true" focusable="false"> |
| 95 | + <path d="M13.41 12l5.3-5.29a1 1 0 1 0-1.42-1.42L12 10.59l-5.29-5.3a1 1 0 0 0-1.42 1.42l5.3 5.29-5.3 5.29a1 1 0 0 0 0 1.42 1 1 0 0 0 1.42 0l5.29-5.3 5.29 5.3a1 1 0 0 0 1.42 0 1 1 0 0 0 0-1.42z"></path> |
| 96 | + </svg> |
| 97 | + Cancel |
| 98 | + </a> |
| 99 | + </div> |
| 100 | + </form> |
| 101 | + </div> |
102 | 102 | </div> |
103 | 103 | @section scripts { |
104 | | - <script src="@Url.Content("~/js/frameworks/htmleditor.js")" asp-append-version="true"></script> |
| 104 | + <script src="@Url.Content("~/js/frameworks/htmleditor.js")" asp-append-version="true"></script> |
105 | 105 | } |
106 | 106 |
|
0 commit comments