<commit_before>﻿@using SFA.DAS.EmployerApprenticeshipsService.Domain
@using SFA.DAS.EmployerApprenticeshipsService.Web;
@using SFA.DAS.EmployerApprenticeshipsService.Web.Models;

@model OrchestratorResponse<EmployerAgreementViewModel>

<div class="grid-row">
    <div class="column-two-thirds">
        <h1 class="heading-xlarge">Employer agreement</h1>
    </div>
</div>

<div class="grid-row">
    <div class="column-two-thirds">

        <h1 class="heading-large">@Model.Data.EmployerAgreement.LegalEntityName</h1>
        <h2>@Model.Data.EmployerAgreement.LegalEntityRegisteredAddress</h2>
    </div>
</div>
<div class="grid-row">
    <div class="column-two-thirds">
        <p>@Model.Data.EmployerAgreement.TemplateText</p>
    </div>
</div>
<div class="grid-row">
    <div class="column-two-thirds">
        @if (Model.Data.EmployerAgreement.Status == EmployerAgreementStatus.Pending && !Model.Data.EmployerAgreement.ExpiredDate.HasValue)
        {
            <form action="@Url.Action("Sign")" method="POST">
                <input type="hidden" id="accountId" name="accountId" value="@Model.Data.EmployerAgreement.AccountId" />
                <input type="hidden" id="agreementId" name="agreementId" value="@Model.Data.EmployerAgreement.Id" />
                <input type="hidden" id="legalEntityName" name="legalEntityName" value="@Model.Data.EmployerAgreement.LegalEntityName" />
                <div class="form-group @(TempData["notunderstood"] != null ? "error" : "")">
                    @if (TempData["notunderstood"] != null)
                    {
                        <legend>
                            <span class="error-message">You must indicate that you have read and understood the terms</span>
                        </legend>
                    }
                    <label class="block-label" for="understood">
                        <input type="checkbox" id="understood" name="understood" value="understood">
                        I have read and understood the agreement
                    </label>
                </div>   
                <p></p>
                <input class="button" id="signAgreement" type="submit" value="Sign agreement">
            </form>
        }
        else if (Model.Data.EmployerAgreement.Status == EmployerAgreementStatus.Signed || Model.Data.EmployerAgreement.Status == EmployerAgreementStatus.Expired)
        {
            <p>Signed By</p>
            <p>@Model.Data.EmployerAgreement.SignedByName</p>
            <p>Signed Date</p>
            <p>@Model.Data.EmployerAgreement.SignedDate.Value.ToLocalTime()</p>
            if (Model.Data.EmployerAgreement.Status == EmployerAgreementStatus.Expired)
            {
                <p>Expired Date</p>
                <p>@Model.Data.EmployerAgreement.ExpiredDate</p>
            }
        }
    </div>
</div><commit_msg>Breadcrumb on the Agreement page<commit_after>﻿@using SFA.DAS.EmployerApprenticeshipsService.Domain
@using SFA.DAS.EmployerApprenticeshipsService.Web;
@using SFA.DAS.EmployerApprenticeshipsService.Web.Models;

@model OrchestratorResponse<EmployerAgreementViewModel>

<div class="grid-row">
    <div class="column-two-thirds">
        <h1 class="heading-xlarge">Employer agreement</h1>
    </div>
</div>

<div class="grid-row">
    <div class="column-two-thirds">

        <h1 class="heading-large">@Model.Data.EmployerAgreement.LegalEntityName</h1>
        <h2>@Model.Data.EmployerAgreement.LegalEntityRegisteredAddress</h2>
    </div>
</div>
<div class="grid-row">
    <div class="column-two-thirds">
        <p>@Model.Data.EmployerAgreement.TemplateText</p>
    </div>
</div>
<div class="grid-row">
    <div class="column-two-thirds">
        @if (Model.Data.EmployerAgreement.Status == EmployerAgreementStatus.Pending && !Model.Data.EmployerAgreement.ExpiredDate.HasValue)
        {
            <form action="@Url.Action("Sign")" method="POST">
                <input type="hidden" id="accountId" name="accountId" value="@Model.Data.EmployerAgreement.AccountId" />
                <input type="hidden" id="agreementId" name="agreementId" value="@Model.Data.EmployerAgreement.Id" />
                <input type="hidden" id="legalEntityName" name="legalEntityName" value="@Model.Data.EmployerAgreement.LegalEntityName" />
                <div class="form-group @(TempData["notunderstood"] != null ? "error" : "")">
                    @if (TempData["notunderstood"] != null)
                    {
                        <legend>
                            <span class="error-message">You must indicate that you have read and understood the terms</span>
                        </legend>
                    }
                    <label class="block-label" for="understood">
                        <input type="checkbox" id="understood" name="understood" value="understood">
                        I have read and understood the agreement
                    </label>
                </div>   
                <p></p>
                <input class="button" id="signAgreement" type="submit" value="Sign agreement">
            </form>
        }
        else if (Model.Data.EmployerAgreement.Status == EmployerAgreementStatus.Signed || Model.Data.EmployerAgreement.Status == EmployerAgreementStatus.Expired)
        {
            <p>Signed By</p>
            <p>@Model.Data.EmployerAgreement.SignedByName</p>
            <p>Signed Date</p>
            <p>@Model.Data.EmployerAgreement.SignedDate.Value.ToLocalTime()</p>
            if (Model.Data.EmployerAgreement.Status == EmployerAgreementStatus.Expired)
            {
                <p>Expired Date</p>
                <p>@Model.Data.EmployerAgreement.ExpiredDate</p>
            }
        }
    </div>
</div>
@section breadcrumb {
    <div class="breadcrumbs">
        <ol role="navigation">
            <li><a href="/">Your User Profile</a></li>
            <li><a href="@Url.Action("Index", "EmployerTeam", new {accountId = @Model.Data.EmployerAgreement.AccountId})">Employer Account Homepage</a></li>
            <li><a href="@Url.Action("Index", "EmployerAgreement", new { accountId = @Model.Data.EmployerAgreement.AccountId })">Your Organisations</a></li>
            <li>Employer agreement</li>
        </ol>
    </div>
}
{'fraction_non_alphanumeric': 0.1434991974317817, 'fraction_numerical': 0.0019261637239165329, 'mean_word_length': 2.4198682766190998, 'pattern_counts': {'":': 0, '<': 129, '<?xml version=': 0, '>': 129, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '537395', 'n_tokens_mistral': 1971, 'n_tokens_neox': 1809, 'n_words': 285}