22@using LearningHub .Nhs .WebUI .Models .Catalogue
33@using LearningHub .Nhs .Models .Enums
44@{
5- ViewData [" Title" ] = " Request Access" ;
5+ ViewData [" Title" ] = " Request Access" ;
66}
77
8- @section styles{
9- <link rel =" stylesheet" type =" text/css" href =" ~/css/nhsuk/pages/catalogue.css" asp-append-version =" true" />
8+ @section styles {
9+ <link rel =" stylesheet" type =" text/css" href =" ~/css/nhsuk/pages/catalogue.css" asp-append-version =" true" />
1010}
1111
1212<div class =" request-access-page" >
13- <div class =" nhsuk-width-container app-width-container" >
14- <vc:back-link asp-controller =" Catalogue" asp-action =" @Model.CatalogueUrl" link-text =" Back to: @Model.CatalogueName" />
15- <h1 >Catalogue access request</h1 >
13+ <div class =" nhsuk-width-container app-width-container" >
14+ <vc:back-link asp-controller =" Catalogue" asp-action =" @Model.CatalogueUrl" link-text =" Back to: @Model.CatalogueName" />
15+ <h1 >Catalogue access request</h1 >
1616
17- <div class =" nhsuk-u-reading-width nhsuk-u-font-size-19" >
18- @using (Html .BeginForm (" RequestAccessPost" , " Catalogue" , FormMethod .Post ))
19- {
20- @if (Model .CatalogueAccessRequest != null && Model .CatalogueAccessRequest .Status == CatalogueAccessRequestStatus .Rejected )
21- {
22- <p >Your last request to access this catalogue was denied on @Model.CatalogueAccessRequest.DateRejected.Value.ToString( " dd MMM yyyy" ) for the following reason:</p>
23- <p>@Model.CatalogueAccessRequest.ResponseMessage</p>
24- }
17+ <div class =" nhsuk-u-reading-width nhsuk-u-font-size-19" >
18+ @using (Html .BeginForm (" RequestAccessPost" , " Catalogue" , FormMethod .Post ))
19+ {
20+ @if (Model .CatalogueAccessRequest != null && Model .CatalogueAccessRequest .Status == CatalogueAccessRequestStatus .Rejected )
21+ {
22+ <p >Your last request to access this catalogue was denied on @Model.CatalogueAccessRequest.DateRejected.Value.ToString( " dd MMM yyyy" ) for the following reason:</p>
23+ <p>@Model.CatalogueAccessRequest.ResponseMessage</p>
24+ }
25+ else if (Model .CatalogueAccessRequest != null && Model .CatalogueAccessRequest .Status == CatalogueAccessRequestStatus .Pending )
26+ {
27+ <p >Your access request which was sent on @Model.CatalogueAccessRequest.DateRequested.ToString( " dd MMM yyyy" ) is pending a decision .</p >
28+ <p >If you need further information <a target = " _blank" href = " @ViewBag.SupportUrl" > contact support < / a >< / p >
29+ }
2530
26- <p >You are requesting access to the @Model.CatalogueName catalogue . Enter the information below which will be sent to the catalogue administrator . You will be notified of their decision by email .</p >
31+ <p >You are requesting access to the @Model.CatalogueName catalogue . Enter the information below which will be sent to the catalogue administrator . You will be notified of their decision by email .</p >
2732
28- <table class =" personal-details-table nhsuk-u-margin-bottom-4" >
29- <tr >
30- <td class =" nhsuk-u-font-weight-bold" >Name : </td >
31- <td >@Model.CurrentUser.FirstName @Model.CurrentUser.LastName </td >
32- </tr >
33- <tr >
34- <td class =" nhsuk-u-font-weight-bold" >Email : </td >
35- <td >@Model.CurrentUser.EmailAddress </td >
36- </tr >
37- </table >
33+ <table class =" personal-details-table nhsuk-u-margin-bottom-4" >
34+ <tr >
35+ <td class =" nhsuk-u-font-weight-bold" >Name : </td >
36+ <td >@Model.CurrentUser.FirstName @Model.CurrentUser.LastName </td >
37+ </tr >
38+ <tr >
39+ <td class =" nhsuk-u-font-weight-bold" >Email : </td >
40+ <td >@Model.CurrentUser.EmailAddress </td >
41+ </tr >
42+ </table >
3843
39- <div class =" nhsuk-form-group" >
40- <div class =" nhsuk-hint" id =" message-hint" >
41- Enter your role , place of work , professional body number (if applicable ) and information on why you are requesting access to this catalogue .
42- </div >
44+ <div class =" nhsuk-form-group" >
45+ <div class =" nhsuk-hint" id =" message-hint" >
46+ Enter your role , place of work , professional body number (if applicable ) and information on why you are requesting access to this catalogue .
47+ </div >
4348
44- <textarea asp-for =" AccessRequestMessage" class =" nhsuk-textarea" id =" AccessRequestMessage" rows =" 5" aria-describedby =" message-hint" ></textarea >
45- <div class =" nhsuk-u-margin-top-3" ><span asp-validation-for =" AccessRequestMessage" ></span ></div >
46- </div >
49+ <textarea asp-for =" AccessRequestMessage" class =" nhsuk-textarea" id =" AccessRequestMessage" rows =" 5" aria-describedby =" message-hint" ></textarea >
50+ <div class =" nhsuk-u-margin-top-3" ><span asp-validation-for =" AccessRequestMessage" ></span ></div >
51+ </div >
4752
48- <input type =" hidden" asp-for =" CatalogueNodeId" />
49- <input type =" hidden" asp-for =" CatalogueName" />
50- <input type =" hidden" asp-for =" CatalogueUrl" />
51- <input type =" hidden" asp-for =" CurrentUser.FirstName" />
52- <input type =" hidden" asp-for =" CurrentUser.LastName" />
53- <input type =" hidden" asp-for =" CurrentUser.EmailAddress" />
54- <input type =" hidden" asp-for =" ReturnUrl" />
55- @if (Model .CatalogueAccessRequest != null )
56- {
57- <input type =" hidden" asp-for =" CatalogueAccessRequest.DateRejected" />
58- <input type =" hidden" asp-for =" CatalogueAccessRequest.Status" />
59- <input type =" hidden" asp-for =" CatalogueAccessRequest.ResponseMessage" />
60- }
53+ <input type =" hidden" asp-for =" CatalogueNodeId" />
54+ <input type =" hidden" asp-for =" CatalogueName" />
55+ <input type =" hidden" asp-for =" CatalogueUrl" />
56+ <input type =" hidden" asp-for =" CurrentUser.FirstName" />
57+ <input type =" hidden" asp-for =" CurrentUser.LastName" />
58+ <input type =" hidden" asp-for =" CurrentUser.EmailAddress" />
59+ <input type =" hidden" asp-for =" ReturnUrl" />
60+ @if (Model .CatalogueAccessRequest != null )
61+ {
62+ <input type =" hidden" asp-for =" CatalogueAccessRequest.DateRejected" />
63+ <input type =" hidden" asp-for =" CatalogueAccessRequest.Status" />
64+ <input type =" hidden" asp-for =" CatalogueAccessRequest.ResponseMessage" />
65+ }
6166
62- <div class =" display__flex-space-between" >
63- <a class =" nhsuk-button nhsuk-button--secondary" href =" @Model.ReturnUrl" >Cancel </a >
64- <button type =" submit" class =" nhsuk-button" >Send request </button >
65- </div >
66- }
67+ <div class =" display__flex-space-between" >
68+
69+ @if (Model .CatalogueAccessRequest != null && Model .CatalogueAccessRequest .Status == CatalogueAccessRequestStatus .Pending )
70+ {
71+ <a class =" nhsuk-button nhsuk-button--secondary" href =" @Model.ReturnUrl" disabled >Cancel </a >
72+ <button type =" submit" class =" nhsuk-button nhsuk-button--secondary" disabled >Send request </button >
73+ }
74+ else
75+ {
76+ <a class =" nhsuk-button nhsuk-button--secondary" href =" @Model.ReturnUrl" >Cancel </a >
77+ <button type =" submit" class =" nhsuk-button" >Send request </button >
78+ }
6779 </div >
80+ }
6881 </div >
82+ </div >
6983</div >
0 commit comments