Skip to content

Commit

Permalink
Merge pull request #1216 from DFE-Digital/feature/readonly-transfer-p…
Browse files Browse the repository at this point in the history
…rojects

fixes after demo of sending projects to complete
  • Loading branch information
paullocknimble authored Nov 1, 2024
2 parents 0f59569 + 3481fa8 commit a4ccd0c
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
@using Dfe.PrepareTransfers.Web.Dfe.PrepareTransfers.Helpers.TagHelpers
@using Microsoft.AspNetCore.Mvc.TagHelpers
@using Dfe.Academisation.ExtensionMethods
@using Microsoft.Extensions.Configuration
@inject IConfiguration Configuration
@model Dfe.PrepareTransfers.Web.Pages.Projects.AcademyAndTrustInformation.IncomingTrustNameModel
@{
Layout = "_Layout";
Expand Down Expand Up @@ -48,12 +50,15 @@
}
else
{
<label class="govuk-label govuk-label--m" for="IncomingTrustReferenceNumber">
Incoming trust reference number
</label>
<input type="hidden" asp-for="@Model.IncomingTrustReferenceNumber" />
<div class="govuk-warning-text">
<span class="govuk-warning-text__icon" aria-hidden="true">!</span>
<strong class="govuk-warning-text__text">
<span class="govuk-visually-hidden">Warning</span>
The correct permissions are needed to update the trust reference number.
You must <a class="govuk-link" href="@Configuration["GetHelpLink"]">contact service support</a> and ask them to update the incoming trusts reference number to this project.
</strong>
</div>
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,10 +100,10 @@ private void ValidateProject(int id)
"You must enter an incoming trust for this project before you can record a decision.");
}

if (!hasIncomingTrustReferenceNumber)
if (!hasIncomingTrustReferenceNumber && _project.IsFormAMat.HasValue && _project.IsFormAMat.Value == true)
{
ModelState.AddModelError($"/transfers/project/{id}/academy-and-trust-information/incoming-trust-name?returns={returnPage}",
"You must enter an incoming reference number for this project before you can record a decision.");
"You must enter an incoming trust reference number for this project before you can record a decision.");
}
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@page "/task-list/decision/transfers-decision-approved-info"
@page "/transfers/task-list/decision/transfers-decision-approved-info"
@using Dfe.PrepareConversions.Extensions
@using Dfe.PrepareConversions.TagHelpers
@using Microsoft.Extensions.Configuration
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using System.Threading.Tasks;
using Dfe.PrepareTransfers.Web.Models;
using LinkItem = Dfe.PrepareTransfers.Web.Models.LinkItem;
using Links = Dfe.PrepareTransfers.Web.Models.Links;

namespace Dfe.PrepareTransfers.Pages.TaskList.Decision
Expand Down

0 comments on commit a4ccd0c

Please sign in to comment.