-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1065 from DFE-Digital/hotfix/model-binding
Update how we call model
- Loading branch information
Showing
1 changed file
with
15 additions
and
14 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,31 +3,32 @@ | |
@model SchoolAndTrustInformationViewModel | ||
@{ | ||
var kw = WidthOverride.TwoThirds; | ||
var grantTypeFull = "Full"; | ||
var grantTypeIntermediate = "Intermediate"; | ||
var grantTypeFull = "Full"; | ||
var grantTypeIntermediate = "Intermediate"; | ||
} | ||
|
||
<dl class="govuk-summary-list"> | ||
<govuk-summary-list-row name="school-name" label="School name" key-width="@kw" asp-for="SchoolName" /> | ||
<govuk-summary-list-row name="unique-reference-number" label="Unique reference number (URN)" key-width="@kw" asp-for="SchoolUrn" /> | ||
|
||
<govuk-summary-list-row if="@Model.AcademyTypeAndRoute.Equals(AcademyTypeAndRoutes.Sponsored)" name="name-of-trust" label="Trust name" key-width="@kw" asp-for="NameOfTrust" asp-page="@Links.SchoolAndTrustInformationSection.UpdateTrust.Page" asp-route-id="@Model.Id" hidden-text="update trust" /> | ||
<govuk-summary-list-row if="!@Model.AcademyTypeAndRoute.Equals(AcademyTypeAndRoutes.Sponsored)" name="name-of-trust" label="Trust name" key-width="@kw" asp-for="NameOfTrust" /> | ||
<govuk-summary-list-row if="!Model.AcademyTypeAndRoute.Equals(AcademyTypeAndRoutes.Sponsored)" name="name-of-trust" label="Trust name" key-width="@kw" asp-for="NameOfTrust" /> | ||
<govuk-summary-list-row name="trust-reference-number" label="Trust reference number" key-width="@kw" asp-for="TrustReferenceNumber" /> | ||
<govuk-summary-list-row if="@Model.IsDao is false" name="project-recommendation" label="Recommendation" key-width="@kw" value="@Model.RecommendationForProject" asp-page="@Links.SchoolAndTrustInformationSection.ProjectRecommendation.Page" asp-route-id="@Model.Id" hidden-text="recommendation" /> | ||
<govuk-summary-list-row if="@Model.IsDao" name="form-7-received" label="Has the Schools Notification Mailbox (SNM) received a Form 7?" key-width="@kw" value="@Model.Form7Received" asp-route-id="@Model.Id" asp-page="@Links.SchoolAndTrustInformationSection.Form7Received.Page" hidden-text="form 7 received" /> | ||
<govuk-summary-list-row name="form-7-received-date" if="@Model.WasForm7Received" label="Date SNM received Form 7" key-width="@kw" value="@Model.Form7ReceivedDate" asp-route-id="@Model.Id" asp-page="@Links.SchoolAndTrustInformationSection.Form7ReceivedDate.Page" hidden-text="date form 7 received" /> | ||
<govuk-summary-list-row if="@Model.IsDao" name="dao-pack-sent-date" label="Date directive academy order (DAO) pack sent" key-width="@kw" value="@Model.DaoPackSentDate" asp-page="@Links.SchoolAndTrustInformationSection.DaoPackSent.Page" asp-route-id="@Model.Id" /> | ||
<govuk-summary-list-row if="!Model.IsDao" name="project-recommendation" label="Recommendation" key-width="@kw" value="@Model.RecommendationForProject" asp-page="@Links.SchoolAndTrustInformationSection.ProjectRecommendation.Page" asp-route-id="@Model.Id" hidden-text="recommendation" /> | ||
<govuk-summary-list-row if="Model.IsDao" name="form-7-received" label="Has the Schools Notification Mailbox (SNM) received a Form 7?" key-width="@kw" value="@Model.Form7Received" asp-route-id="@Model.Id" asp-page="@Links.SchoolAndTrustInformationSection.Form7Received.Page" hidden-text="form 7 received" /> | ||
<govuk-summary-list-row name="form-7-received-date" if="Model.WasForm7Received" label="Date SNM received Form 7" key-width="@kw" value="@Model.Form7ReceivedDate" asp-route-id="@Model.Id" asp-page="@Links.SchoolAndTrustInformationSection.Form7ReceivedDate.Page" hidden-text="date form 7 received" /> | ||
<govuk-summary-list-row if="Model.IsDao" name="dao-pack-sent-date" label="Date directive academy order (DAO) pack sent" key-width="@kw" value="@Model.DaoPackSentDate" asp-page="@Links.SchoolAndTrustInformationSection.DaoPackSent.Page" asp-route-id="@Model.Id" /> | ||
<govuk-summary-list-row name="academy-type-and-route" label="Academy type and route" key-width="@kw" value="@Model.AcademyTypeAndRoute" asp-route-id="@Model.Id" hidden-text="academy type and route" /> | ||
@* Voluntary grant *@ | ||
<govuk-summary-list-row if="@Model.AcademyTypeAndRoute.Equals("Converter") && [email protected] && [email protected]" name="grant-funding-amount" label="Grant funding amount" key-width="@kw" value="@Model.ConversionSupportGrantAmount" asp-route-id="@Model.Id" asp-page="@Links.SchoolAndTrustInformationSection.RouteAndGrant.Page" hidden-text="grant funding amount" /> | ||
<govuk-summary-list-row if="@Model.AcademyTypeAndRoute.Equals("Converter") && [email protected] && [email protected] && string.IsNullOrEmpty(Model.ConversionSupportGrantChangeReason) != true" name="grant-funding-reason" label="Grant funding reason" key-width="@kw" value="@Model.ConversionSupportGrantChangeReason" asp-route-id="@Model.Id" asp-page="@Links.SchoolAndTrustInformationSection.RouteAndGrant.Page" hidden-text="grant funding reason" /> | ||
<govuk-summary-list-row if='@Model.AcademyTypeAndRoute.Equals("Converter") && !Model.IsPRU && !Model.IsSEN' name="grant-funding-amount" label="Grant funding amount" key-width="@kw" value="@Model.ConversionSupportGrantAmount" asp-route-id="@Model.Id" asp-page="@Links.SchoolAndTrustInformationSection.RouteAndGrant.Page" hidden-text="grant funding amount" /> | ||
<govuk-summary-list-row if='@Model.AcademyTypeAndRoute.Equals("Converter") && !Model.IsPRU && !Model.IsSEN && !string.IsNullOrEmpty(Model.ConversionSupportGrantChangeReason)' name="grant-funding-reason" label="Grant funding reason" key-width="@kw" value="@Model.ConversionSupportGrantChangeReason" asp-route-id="@Model.Id" asp-page="@Links.SchoolAndTrustInformationSection.RouteAndGrant.Page" hidden-text="grant funding reason" /> | ||
|
||
@* Sponsored grant *@ | ||
<govuk-summary-list-row if="@Model.IsDao || @Model.IsPRU || @Model.IsSEN" name="grant-funding-type" label="Grant funding type" key-width="@kw" value="@Model.ConversionSupportGrantType" asp-route-id="@Model.Id" asp-page="@Links.SchoolAndTrustInformationSection.GrantType.Page" hidden-text="grant funding type" /> | ||
<govuk-summary-list-row if="@Model.IsDao || @Model.IsPRU || @Model.IsSEN" name="grant-funding-amount" label="Grant funding amount" key-width="@kw" value="@Model.ConversionSupportGrantAmount" asp-route-id="@Model.Id" asp-page="@Links.SchoolAndTrustInformationSection.GrantDetails.Page" hidden-text="grant funding amount" /> | ||
<govuk-summary-list-row if="@Model.IsPRU" name="number-of-sites" label="Number of sites" key-width="@kw" value="@Model.ConversionSupportNumberOfSites" asp-route-id="@Model.Id" asp-page="@Links.SchoolAndTrustInformationSection.NumberOfSites.Page" hidden-text="number of sites" /> | ||
<govuk-summary-list-row if="@Model.IsDao|| @Model.IsPRU || @Model.IsSEN && string.IsNullOrEmpty(Model.ConversionSupportGrantChangeReason) != true" name="grant-funding-reason" label="Grant funding reason" key-width="@kw" value="@Model.ConversionSupportGrantChangeReason" asp-route-id="@Model.Id" asp-page="@Links.SchoolAndTrustInformationSection.GrantDetails.Page" hidden-text="grant funding reason" /> | ||
<govuk-summary-list-row if="@Model.IsDao || @Model.IsPRU || @Model.IsSEN && (Model.ConversionSupportGrantType == grantTypeFull || Model.ConversionSupportGrantType == grantTypeIntermediate)" name="grant-funding-environmental-improvement-grant" label="Is the school applying for an EIG (Environmental Improvement Grant)?" key-width="@kw" value="@Model.ConversionSupportGrantEnvironmentalImprovementGrant" asp-route-id="@Model.Id" asp-page="@Links.SchoolAndTrustInformationSection.GrantDetails.Page" hidden-text="grant environmental improvement" /> | ||
<govuk-summary-list-row if="Model.IsDao || Model.IsPRU || Model.IsSEN" name="grant-funding-type" label="Grant funding type" key-width="@kw" value="@Model.ConversionSupportGrantType" asp-route-id="@Model.Id" asp-page="@Links.SchoolAndTrustInformationSection.GrantType.Page" hidden-text="grant funding type" /> | ||
<govuk-summary-list-row if="Model.IsDao || Model.IsPRU || Model.IsSEN" name="grant-funding-amount" label="Grant funding amount" key-width="@kw" value="@Model.ConversionSupportGrantAmount" asp-route-id="@Model.Id" asp-page="@Links.SchoolAndTrustInformationSection.GrantDetails.Page" hidden-text="grant funding amount" /> | ||
<govuk-summary-list-row if="Model.IsPRU" name="number-of-sites" label="Number of sites" key-width="@kw" value="@Model.ConversionSupportNumberOfSites" asp-route-id="@Model.Id" asp-page="@Links.SchoolAndTrustInformationSection.NumberOfSites.Page" hidden-text="number of sites" /> | ||
<govuk-summary-list-row if="Model.IsDao || Model.IsPRU || Model.IsSEN && !string.IsNullOrEmpty(Model.ConversionSupportGrantChangeReason)" name="grant-funding-reason" label="Grant funding reason" key-width="@kw" value="@Model.ConversionSupportGrantChangeReason" asp-route-id="@Model.Id" asp-page="@Links.SchoolAndTrustInformationSection.GrantDetails.Page" hidden-text="grant funding reason" /> | ||
<govuk-summary-list-row if="Model.IsDao || Model.IsPRU || Model.IsSEN && (Model.ConversionSupportGrantType == grantTypeFull || Model.ConversionSupportGrantType == grantTypeIntermediate)" name="grant-funding-environmental-improvement-grant" label="Is the school applying for an EIG (Environmental Improvement Grant)?" key-width="@kw" value="@Model.ConversionSupportGrantEnvironmentalImprovementGrant" asp-route-id="@Model.Id" asp-page="@Links.SchoolAndTrustInformationSection.GrantDetails.Page" hidden-text="grant environmental improvement" /> | ||
|
||
<govuk-summary-list-row name="advisory-board-date" label="Date of advisory board" key-width="@kw" value="@Model.HeadTeacherBoardDate" asp-page="@Links.SchoolAndTrustInformationSection.HeadTeacherBoardDate.Page" asp-route-id="@Model.Id" hidden-text="head teacher board date" /> | ||
<govuk-summary-list-row name="proposed-academy-opening-date" label="Proposed academy opening date" key-width="@kw" value="@Model.ProposedAcademyOpeningDate" asp-page="@Links.SchoolAndTrustInformationSection.ProposedAcademyOpeningDate.Page" asp-route-id="@Model.Id" hidden-text="proposed academy opening date" /> | ||
|