<commit_before>﻿
@model SFA.DAS.EmployerUsers.Web.Models.OrchestratorResponse<SFA.DAS.EmployerUsers.Web.Models.ChangeEmailViewModel>

@{
    ViewBag.PageID = "page-change-email-address";
    ViewBag.Title = "Change your email address";
}

<h1 class="heading-xlarge"> Change your email address </h1>

<form method="post">
    @Html.AntiForgeryToken()

    <fieldset>
        <legend class="visuallyhidden">New email address</legend>

        <div class="form-group @(!string.IsNullOrEmpty(Model.Data.NewEmailAddressError) ? "error" : "")">
            <label class="form-label-bold" for="NewEmailAddress">
                <span>New email address</span>
                @if (!string.IsNullOrEmpty(Model.Data.NewEmailAddressError))
                {
                    <span class="error-message" id="error-message-email">@Model.Data.NewEmailAddressError</span>
                }
            </label>
            <input autofocus="autofocus" aria-required="true" class="form-control" id="NewEmailAddress" name="NewEmailAddress">
        </div>

        <div class="form-group @(!string.IsNullOrEmpty(Model.Data.ConfirmEmailAddressError) ? "error" : "")">
            <label class="form-label-bold" for="ConfirmEmailAddress">
                <span>Re-type email addresss</span>

                @if (!string.IsNullOrEmpty(Model.Data.ConfirmEmailAddressError))
                {
                    <span class="error-message" id="error-message-email">@Model.Data.ConfirmEmailAddressError</span>
                }
            </label>
            <input aria-required="true" class="form-control" id="ConfirmEmailAddress" name="ConfirmEmailAddress">
        </div>
    </fieldset>
    <button type="submit" class="button">Continue</button>
</form>

@section breadcrumb {
    <div class="breadcrumbs">
        <ol role="navigation">
            <li><a href="@Model.Data.ReturnUrl" class="back-link">Back</a></li>
        </ol>
    </div>
}<commit_msg>Form validation on change email page<commit_after>﻿
@model SFA.DAS.EmployerUsers.Web.Models.OrchestratorResponse<SFA.DAS.EmployerUsers.Web.Models.ChangeEmailViewModel>

@{
    ViewBag.PageID = "page-change-email-address";
    ViewBag.Title = "Change your email address";
}

@if (!Model.Data.Valid)
{
    <div class="error-summary" role="group" tabindex="-1">
        <h1 class="heading-medium error-summary-heading" id="error-summary-heading"> Errors to fix </h1>
        <p>Check the following details:</p>
        <ul class="error-summary-list">
            @if (!string.IsNullOrEmpty(Model.Data.NewEmailAddressError))
            {
                <li><a href="#NewEmailAddress">@Model.Data.NewEmailAddressError</a></li>
            }
            @if (!string.IsNullOrEmpty(Model.Data.ConfirmEmailAddressError))
            {
                <li><a href="#ConfirmEmailAddress">@Model.Data.ConfirmEmailAddressError</a></li>
            }
        </ul>
    </div>
}

<h1 class="heading-xlarge"> Change your email address </h1>
<form method="post">
    @Html.AntiForgeryToken()
    <fieldset>
        <legend class="visuallyhidden">New email address</legend>
        <div class="form-group @(!string.IsNullOrEmpty(Model.Data.NewEmailAddressError) ? "error" : "")">
            <label for="NewEmailAddress">
                <span class="form-label-bold">New email address</span>
                @if (!string.IsNullOrEmpty(Model.Data.NewEmailAddressError))
                {
                    <span class="error-message" id="error-message-email">@Model.Data.NewEmailAddressError</span>
                }
            </label>
            <input autofocus="autofocus" aria-required="true" class="form-control" id="NewEmailAddress" name="NewEmailAddress"
                    @(!string.IsNullOrEmpty(Model.Data.NewEmailAddressError) ? "aria-invalid=true aria-describedby=error-message-email" : "" )>
        </div>
        <div class="form-group @(!string.IsNullOrEmpty(Model.Data.ConfirmEmailAddressError) ? "error" : "")">
            <label for="ConfirmEmailAddress">
                <span class="form-label-bold">Re-type email address</span>
                @if (!string.IsNullOrEmpty(Model.Data.ConfirmEmailAddressError))
                {
                    <span class="error-message" id="error-message-confirm-email">@Model.Data.ConfirmEmailAddressError</span>
                }
            </label>
            <input aria-required="true" class="form-control" id="ConfirmEmailAddress" name="ConfirmEmailAddress"
                    @(!string.IsNullOrEmpty(Model.Data.ConfirmEmailAddressError) ? "aria-invalid=true aria-describedby=error-message-confirm-email" : "" )>
        </div>
    </fieldset>
    <button type="submit" class="button">Continue</button>
</form>

        @section breadcrumb {
            <div class="breadcrumbs">
                <ol role="navigation">
                    <li><a href="@Model.Data.ReturnUrl" class="back-link">Back</a></li>
                </ol>
            </div>
        }
{'fraction_non_alphanumeric': 0.14950634696755993, 'fraction_numerical': 0.0014104372355430183, 'mean_word_length': 2.610181818181818, 'pattern_counts': {'":': 0, '<': 93, '<?xml version=': 0, '>': 93, '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': '2559831', 'n_tokens_mistral': 1459, 'n_tokens_neox': 1423, 'n_words': 213}