();
+
+ app.UseEndpoints(endpoints =>
+ {
+ endpoints.MapControllers();
+ });
+
+ HangfireConfigurationHelper.ConfigureApp(app);
+
+ lifetime.ApplicationStarted.Register(
+ () =>
+ {
+ // Summary:
+ // Triggered when the application host has fully started and is about to wait for
+ // a graceful shutdown.
+ CustomLogger.Information("Application Started");
+ });
+ lifetime.ApplicationStopping.Register(
+ () =>
+ {
+ // Summary:
+ // Triggered when the application host is performing a graceful shutdown. Requests
+ // may still be in flight. Shutdown will block until this event completes.
+ CustomLogger.Information("Application Stopping");
+ });
+ }
+
+ private static void AddStringTrimmingProvider(MvcOptions option)
+ {
+ IModelBinderProvider binderToFind =
+ option.ModelBinderProviders.FirstOrDefault(x => x.GetType() == typeof(SimpleTypeModelBinderProvider));
+ if (binderToFind == null)
+ {
+ return;
+ }
+
+ int index = option.ModelBinderProviders.IndexOf(binderToFind);
+ option.ModelBinderProviders.Insert(index, new TrimmingModelBinderProvider());
+ }
+
+ }
+}
diff --git a/GenderPayGap.WebUI/Views/AddOrganisationConfirmation/Confirmation.cshtml b/GenderPayGap.WebUI/Views/AddOrganisationConfirmation/Confirmation.cshtml
index 5b53c54e3..f46969dac 100644
--- a/GenderPayGap.WebUI/Views/AddOrganisationConfirmation/Confirmation.cshtml
+++ b/GenderPayGap.WebUI/Views/AddOrganisationConfirmation/Confirmation.cshtml
@@ -4,7 +4,7 @@
@model UserOrganisation
@{
UserOrganisation userOrg = Model;
- string encryptedOrgId = Encryption.EncryptQuerystring(userOrg.OrganisationId.ToString());
+ string encryptedOrgId = Encryption.EncryptId(userOrg.OrganisationId);
if (userOrg.PINConfirmedDate.HasValue)
{
diff --git a/GenderPayGap.WebUI/Views/AddOrganisationEnterPin/ServiceActivated.cshtml b/GenderPayGap.WebUI/Views/AddOrganisationEnterPin/ServiceActivated.cshtml
index abb9f12c5..2b5c03753 100644
--- a/GenderPayGap.WebUI/Views/AddOrganisationEnterPin/ServiceActivated.cshtml
+++ b/GenderPayGap.WebUI/Views/AddOrganisationEnterPin/ServiceActivated.cshtml
@@ -2,7 +2,7 @@
@using GovUkDesignSystem
@model GenderPayGap.Database.UserOrganisation
@{
- string encryptedOrganisationId = Encryption.EncryptQuerystring(Model.Organisation.OrganisationId.ToString());
+ string encryptedOrganisationId = Encryption.EncryptId(Model.Organisation.OrganisationId);
ViewBag.Title = "Service activated - Gender pay gap reporting service";
}
diff --git a/GenderPayGap.WebUI/Views/AddOrganisationFound/AlreadyRegistering.cshtml b/GenderPayGap.WebUI/Views/AddOrganisationFound/AlreadyRegistering.cshtml
index 827151c40..de32a2e44 100644
--- a/GenderPayGap.WebUI/Views/AddOrganisationFound/AlreadyRegistering.cshtml
+++ b/GenderPayGap.WebUI/Views/AddOrganisationFound/AlreadyRegistering.cshtml
@@ -6,7 +6,7 @@
@model GenderPayGap.WebUI.Models.AddOrganisation.AddOrganisationAlreadyRegisteringViewModel
@{
UserOrganisation userOrg = Model.ExistingUserOrganisation;
- string encryptedOrgId = Encryption.EncryptQuerystring(userOrg.OrganisationId.ToString());
+ string encryptedOrgId = Encryption.EncryptId(userOrg.OrganisationId);
ViewBag.Title = userOrg.PINConfirmedDate.HasValue
? "You are already registered - Gender pay gap service"
diff --git a/GenderPayGap.WebUI/Views/CompareEmployers/AddRemoveEmployerNew.cshtml b/GenderPayGap.WebUI/Views/CompareEmployers/AddRemoveEmployerNew.cshtml
index 6ddf0a20f..82b49cc33 100644
--- a/GenderPayGap.WebUI/Views/CompareEmployers/AddRemoveEmployerNew.cshtml
+++ b/GenderPayGap.WebUI/Views/CompareEmployers/AddRemoveEmployerNew.cshtml
@@ -2,7 +2,7 @@
@model GenderPayGap.Database.Organisation
@{
- string returnUrl = Context.GetUri().PathAndQuery;
+ string returnUrl = $"{Context.Request.Path}{Context.Request.QueryString}";
}
@if (CompareViewService.BasketContains(Model.OrganisationId))
diff --git a/GenderPayGap.WebUI/Views/CompareEmployers/CompareEmployersForYear.cshtml b/GenderPayGap.WebUI/Views/CompareEmployers/CompareEmployersForYear.cshtml
index f57d94691..88cf4175d 100644
--- a/GenderPayGap.WebUI/Views/CompareEmployers/CompareEmployersForYear.cshtml
+++ b/GenderPayGap.WebUI/Views/CompareEmployers/CompareEmployersForYear.cshtml
@@ -6,7 +6,6 @@
@using GovUkDesignSystem.GovUkDesignSystemComponents
@using Microsoft.AspNetCore.Mvc.TagHelpers
@using GenderPayGap.Core
-@using System.ComponentModel.DataAnnotations
@inject ICompareViewService CompareViewService
@model GenderPayGap.WebUI.Models.Compare.CompareEmployersForYearViewModel
@@ -14,7 +13,7 @@
string reportingYearFormatted = ReportingYearsHelper.FormatYearAsReportingPeriod(Model.ReportingYear);
ViewBag.Title = $"Compare employers' gender pay gaps for {reportingYearFormatted} reporting year";
- string currentRelativeUrl = Context.GetUri().PathAndQuery;
+ string currentRelativeUrl = $"{Context.Request.Path}{Context.Request.QueryString}";
string commaSeparatedListOfOrganisationIds = string.Join("-", Model.Organisations.Select(org => org.OrganisationId));
}
@@ -286,7 +285,7 @@
@if (hasEmployerReportedForYear)
{
- @(returnForYear.OrganisationSize.GetAttribute().Name)
+ @(returnForYear.OrganisationSize.GetDisplayName())
|
@(returnForYear.DiffMeanHourlyPayPercent)%
diff --git a/GenderPayGap.WebUI/Views/Errors/ReportAlreadySubmitted.cshtml b/GenderPayGap.WebUI/Views/Errors/ReportAlreadySubmitted.cshtml
index 30754df68..d54f2dceb 100644
--- a/GenderPayGap.WebUI/Views/Errors/ReportAlreadySubmitted.cshtml
+++ b/GenderPayGap.WebUI/Views/Errors/ReportAlreadySubmitted.cshtml
@@ -2,7 +2,7 @@
@model GenderPayGap.WebUI.ErrorHandling.ReportAlreadySubmittedException
@{
- string encryptedOrganisationId = Encryption.EncryptQuerystring(Model.OrganisationId.ToString());
+ string encryptedOrganisationId = Encryption.EncryptId(Model.OrganisationId);
ViewBag.Title = $"Report already submitted - Gender pay gap service";
}
diff --git a/GenderPayGap.WebUI/Views/LateSubmission/LateSubmissionReason.cshtml b/GenderPayGap.WebUI/Views/LateSubmission/LateSubmissionReason.cshtml
index 17ac663ac..27a419a43 100644
--- a/GenderPayGap.WebUI/Views/LateSubmission/LateSubmissionReason.cshtml
+++ b/GenderPayGap.WebUI/Views/LateSubmission/LateSubmissionReason.cshtml
@@ -6,7 +6,7 @@
@model GenderPayGap.WebUI.Models.Report.LateSubmissionReasonViewModel
@{
- string encryptedOrganisationId = Encryption.EncryptQuerystring(Model.Organisation.OrganisationId.ToString());
+ string encryptedOrganisationId = Encryption.EncryptId(Model.Organisation.OrganisationId);
string formattedReportingYears = ReportingYearsHelper.FormatYearAsReportingPeriod(Model.ReportingYear);
DateTime snapshotDate = Model.Organisation.SectorType.GetAccountingStartDate(Model.ReportingYear);
diff --git a/GenderPayGap.WebUI/Views/LateSubmission/LateSubmissionWarning.cshtml b/GenderPayGap.WebUI/Views/LateSubmission/LateSubmissionWarning.cshtml
index 36cb0f415..184c5e4fc 100644
--- a/GenderPayGap.WebUI/Views/LateSubmission/LateSubmissionWarning.cshtml
+++ b/GenderPayGap.WebUI/Views/LateSubmission/LateSubmissionWarning.cshtml
@@ -5,7 +5,7 @@
@model GenderPayGap.WebUI.Models.Report.LateSubmissionWarningViewModel
@{
- string encryptedOrganisationId = Encryption.EncryptQuerystring(Model.Organisation.OrganisationId.ToString());
+ string encryptedOrganisationId = Encryption.EncryptId(Model.Organisation.OrganisationId);
string formattedReportingYears = ReportingYearsHelper.FormatYearAsReportingPeriod(Model.ReportingYear);
DateTime snapshotDate = Model.Organisation.SectorType.GetAccountingStartDate(Model.ReportingYear);
diff --git a/GenderPayGap.WebUI/Views/ManageOrganisations/ManageOrganisation.cshtml b/GenderPayGap.WebUI/Views/ManageOrganisations/ManageOrganisation.cshtml
index a7887e23f..dbecd543e 100644
--- a/GenderPayGap.WebUI/Views/ManageOrganisations/ManageOrganisation.cshtml
+++ b/GenderPayGap.WebUI/Views/ManageOrganisations/ManageOrganisation.cshtml
@@ -9,7 +9,7 @@
@{
ViewBag.Title = "Manage your employers - Gender pay gap service";
- string encryptedOrganisationId = Encryption.EncryptQuerystring(Model.Organisation.OrganisationId.ToString());
+ string encryptedOrganisationId = Encryption.EncryptId(Model.Organisation.OrganisationId);
}
@section BeforeMain {
@@ -191,7 +191,7 @@
|
@foreach (User userRegisteredToReport in usersRegisteredToReportForOrganisation)
{
- string encryptedUserId = Encryption.EncryptQuerystring(userRegisteredToReport.UserId.ToString());
+ string encryptedUserId = Encryption.EncryptId(userRegisteredToReport.UserId);
@foreach (UserOrganisation userOrganisation in Model.UserOrganisations)
{
- string encryptedOrganisationId = Encryption.EncryptQuerystring(userOrganisation.OrganisationId.ToString());
+ string encryptedOrganisationId = Encryption.EncryptId(userOrganisation.OrganisationId);
@if (userOrganisation.IsAwaitingActivationPIN())
diff --git a/GenderPayGap.WebUI/Views/ManageOrganisations/ReportStatusBadge.cshtml b/GenderPayGap.WebUI/Views/ManageOrganisations/ReportStatusBadge.cshtml
index 57526ac14..6f443a183 100644
--- a/GenderPayGap.WebUI/Views/ManageOrganisations/ReportStatusBadge.cshtml
+++ b/GenderPayGap.WebUI/Views/ManageOrganisations/ReportStatusBadge.cshtml
@@ -44,7 +44,7 @@
reportTagColour = "govuk-tag--blue";
break;
case ReportStatusTag.Overdue:
- int daysOverdue = VirtualDateTime.Now.Date.Subtract(Model.DeadlineDate).TotalDays.ToInt32();
+ int daysOverdue = (int)(VirtualDateTime.Now.Date.Subtract(Model.DeadlineDate).TotalDays);
reportTagHtml = @
@(daysOverdue)
@(daysOverdue == 1 ? "day" : "days")
diff --git a/GenderPayGap.WebUI/Views/RemoveUserFromOrganisation/ConfirmRemove.cshtml b/GenderPayGap.WebUI/Views/RemoveUserFromOrganisation/ConfirmRemove.cshtml
index 1e56c40b0..2d6f15082 100644
--- a/GenderPayGap.WebUI/Views/RemoveUserFromOrganisation/ConfirmRemove.cshtml
+++ b/GenderPayGap.WebUI/Views/RemoveUserFromOrganisation/ConfirmRemove.cshtml
@@ -5,8 +5,8 @@
@model GenderPayGap.WebUI.Models.RemoveUserFromOrganisation.RemoveUserFromOrganisationViewModel
@{
ViewBag.Title = "Confirm removal of user - Gender pay gap service";
- string encryptedOrganisationId = Encryption.EncryptQuerystring(Model.Organisation.OrganisationId.ToString());
- string encryptedUserId = Encryption.EncryptQuerystring(Model.UserToRemove.UserId.ToString());
+ string encryptedOrganisationId = Encryption.EncryptId(Model.Organisation.OrganisationId);
+ string encryptedUserId = Encryption.EncryptId(Model.UserToRemove.UserId);
bool userRemovingSelf = Model.UserToRemove.UserId == Model.LoggedInUser.UserId;
}
diff --git a/GenderPayGap.WebUI/Views/RemoveUserFromOrganisation/UserRemoved.cshtml b/GenderPayGap.WebUI/Views/RemoveUserFromOrganisation/UserRemoved.cshtml
index 08d9f99ec..608a5009f 100644
--- a/GenderPayGap.WebUI/Views/RemoveUserFromOrganisation/UserRemoved.cshtml
+++ b/GenderPayGap.WebUI/Views/RemoveUserFromOrganisation/UserRemoved.cshtml
@@ -3,7 +3,7 @@
@model GenderPayGap.WebUI.Models.RemoveUserFromOrganisation.RemoveUserFromOrganisationViewModel
@{
ViewBag.Title = "Remove organisation reason - Gender pay gap service";
- string encryptedOrganisationId = Encryption.EncryptQuerystring(Model.Organisation.OrganisationId.ToString());
+ string encryptedOrganisationId = Encryption.EncryptId(Model.Organisation.OrganisationId);
bool userRemovedSelf = Model.UserToRemove.UserId == Model.LoggedInUser.UserId;
}
diff --git a/GenderPayGap.WebUI/Views/ReportConfirmation/ReportConfirmation.cshtml b/GenderPayGap.WebUI/Views/ReportConfirmation/ReportConfirmation.cshtml
index c0da4b16a..4ca828aad 100644
--- a/GenderPayGap.WebUI/Views/ReportConfirmation/ReportConfirmation.cshtml
+++ b/GenderPayGap.WebUI/Views/ReportConfirmation/ReportConfirmation.cshtml
@@ -4,7 +4,7 @@
@model GenderPayGap.Database.Return
@{
- string encryptedOrganisationId = Encryption.EncryptQuerystring(Model.Organisation.OrganisationId.ToString());
+ string encryptedOrganisationId = Encryption.EncryptId(Model.Organisation.OrganisationId);
int reportingYear = Model.AccountingDate.Year;
string formattedReportingYears = ReportingYearsHelper.FormatYearAsReportingPeriod(reportingYear);
diff --git a/GenderPayGap.WebUI/Views/ReportDiscardDraft/ReportDiscardDraft.cshtml b/GenderPayGap.WebUI/Views/ReportDiscardDraft/ReportDiscardDraft.cshtml
index 75203e9e0..148c132c8 100644
--- a/GenderPayGap.WebUI/Views/ReportDiscardDraft/ReportDiscardDraft.cshtml
+++ b/GenderPayGap.WebUI/Views/ReportDiscardDraft/ReportDiscardDraft.cshtml
@@ -5,7 +5,7 @@
@model GenderPayGap.WebUI.Models.Report.ReportDiscardDraftViewModel
@{
- string encryptedOrganisationId = Encryption.EncryptQuerystring(Model.Organisation.OrganisationId.ToString());
+ string encryptedOrganisationId = Encryption.EncryptId(Model.Organisation.OrganisationId);
string formattedReportingYears = ReportingYearsHelper.FormatYearAsReportingPeriod(Model.ReportingYear);
string editOrReportTitle = Model.IsEditingSubmittedReturn
diff --git a/GenderPayGap.WebUI/Views/ReportFigures/ReportFigures.cshtml b/GenderPayGap.WebUI/Views/ReportFigures/ReportFigures.cshtml
index d7cbbe009..a87f86e39 100644
--- a/GenderPayGap.WebUI/Views/ReportFigures/ReportFigures.cshtml
+++ b/GenderPayGap.WebUI/Views/ReportFigures/ReportFigures.cshtml
@@ -7,7 +7,7 @@
@model GenderPayGap.WebUI.Models.Report.ReportFiguresViewModel
@{
- string encryptedOrganisationId = Encryption.EncryptQuerystring(Model.Organisation.OrganisationId.ToString());
+ string encryptedOrganisationId = Encryption.EncryptId(Model.Organisation.OrganisationId);
string formattedReportingYears = ReportingYearsHelper.FormatYearAsReportingPeriod(Model.ReportingYear);
string editOrReportTitle = Model.IsEditingSubmittedReturn
diff --git a/GenderPayGap.WebUI/Views/ReportLinkToWebsite/ReportLinkToWebsite.cshtml b/GenderPayGap.WebUI/Views/ReportLinkToWebsite/ReportLinkToWebsite.cshtml
index 9d8f6fb9c..b84be3313 100644
--- a/GenderPayGap.WebUI/Views/ReportLinkToWebsite/ReportLinkToWebsite.cshtml
+++ b/GenderPayGap.WebUI/Views/ReportLinkToWebsite/ReportLinkToWebsite.cshtml
@@ -7,7 +7,7 @@
@model GenderPayGap.WebUI.Models.Report.ReportLinkToWebsiteViewModel
@{
- string encryptedOrganisationId = Encryption.EncryptQuerystring(Model.Organisation.OrganisationId.ToString());
+ string encryptedOrganisationId = Encryption.EncryptId(Model.Organisation.OrganisationId);
string formattedReportingYears = ReportingYearsHelper.FormatYearAsReportingPeriod(Model.ReportingYear);
string editOrReportTitle = Model.IsEditingSubmittedReturn
diff --git a/GenderPayGap.WebUI/Views/ReportOverview/ReportOverview.cshtml b/GenderPayGap.WebUI/Views/ReportOverview/ReportOverview.cshtml
index f11439140..a71927508 100644
--- a/GenderPayGap.WebUI/Views/ReportOverview/ReportOverview.cshtml
+++ b/GenderPayGap.WebUI/Views/ReportOverview/ReportOverview.cshtml
@@ -1,7 +1,6 @@
@using GenderPayGap.Core.Helpers
@using GovUkDesignSystem
@using GovUkDesignSystem.GovUkDesignSystemComponents
-@using System.ComponentModel.DataAnnotations
@using GenderPayGap.Core
@using GenderPayGap.WebUI.Models.Report
@using GenderPayGap.WebUI.Views.Components.StatusMessages
@@ -9,7 +8,7 @@
@model GenderPayGap.WebUI.Models.Report.ReportOverviewViewModel
@{
- string encryptedOrganisationId = Encryption.EncryptQuerystring(Model.Organisation.OrganisationId.ToString());
+ string encryptedOrganisationId = Encryption.EncryptId(Model.Organisation.OrganisationId);
string formattedReportingYears = ReportingYearsHelper.FormatYearAsReportingPeriod(Model.ReportingYear);
string editOrReportTitle = Model.IsEditingSubmittedReturn
@@ -212,7 +211,7 @@
Title = @Number of employees used to establish your headcount for gender pay gap reporting, on your snapshot date,
RightValue = !Model.SizeOfOrganisation.HasValue ?
await Html.GovUkHtmlText(new HtmlText(null, "Not Provided" ))
- : await Html.GovUkHtmlText(new HtmlText(null, Model.SizeOfOrganisation.GetAttribute().Name))
+ : await Html.GovUkHtmlText(new HtmlText(null, Model.SizeOfOrganisation.Value.GetDisplayName()))
}
}
};
@@ -248,7 +247,7 @@
Model.SectorType == SectorTypes.Private ? personResponsibleSection : null,
employeeHeadcountSection,
linkToGenderPayGapInformationSection
- }.Where(s => !s.IsNull()).ToList()
+ }.Where(s => s != null).ToList()
};
await Html.RenderPartialAsync("../Components/ReportOverview/ReportOverviewSections", reportOverviewSections);
diff --git a/GenderPayGap.WebUI/Views/ReportResponsiblePerson/ReportResponsiblePerson.cshtml b/GenderPayGap.WebUI/Views/ReportResponsiblePerson/ReportResponsiblePerson.cshtml
index feb812134..8bd07fbb7 100644
--- a/GenderPayGap.WebUI/Views/ReportResponsiblePerson/ReportResponsiblePerson.cshtml
+++ b/GenderPayGap.WebUI/Views/ReportResponsiblePerson/ReportResponsiblePerson.cshtml
@@ -7,7 +7,7 @@
@model GenderPayGap.WebUI.Models.Report.ReportResponsiblePersonViewModel
@{
- string encryptedOrganisationId = Encryption.EncryptQuerystring(Model.Organisation.OrganisationId.ToString());
+ string encryptedOrganisationId = Encryption.EncryptId(Model.Organisation.OrganisationId);
string formattedReportingYears = ReportingYearsHelper.FormatYearAsReportingPeriod(Model.ReportingYear);
string editOrReportTitle = Model.IsEditingSubmittedReturn
diff --git a/GenderPayGap.WebUI/Views/ReportSizeOfOrganisation/ReportSizeOfOrganisation.cshtml b/GenderPayGap.WebUI/Views/ReportSizeOfOrganisation/ReportSizeOfOrganisation.cshtml
index 6982aaf2c..629e7cbb7 100644
--- a/GenderPayGap.WebUI/Views/ReportSizeOfOrganisation/ReportSizeOfOrganisation.cshtml
+++ b/GenderPayGap.WebUI/Views/ReportSizeOfOrganisation/ReportSizeOfOrganisation.cshtml
@@ -7,7 +7,7 @@
@model GenderPayGap.WebUI.Models.Report.ReportSizeOfOrganisationViewModel
@{
- string encryptedOrganisationId = Encryption.EncryptQuerystring(Model.Organisation.OrganisationId.ToString());
+ string encryptedOrganisationId = Encryption.EncryptId(Model.Organisation.OrganisationId);
string formattedReportingYears = ReportingYearsHelper.FormatYearAsReportingPeriod(Model.ReportingYear);
string editOrReportTitle = Model.IsEditingSubmittedReturn
diff --git a/GenderPayGap.WebUI/Views/ReportStarting/ReportStarting.cshtml b/GenderPayGap.WebUI/Views/ReportStarting/ReportStarting.cshtml
index ba7aa2682..5d9596400 100644
--- a/GenderPayGap.WebUI/Views/ReportStarting/ReportStarting.cshtml
+++ b/GenderPayGap.WebUI/Views/ReportStarting/ReportStarting.cshtml
@@ -6,7 +6,7 @@
@{
ViewBag.Title = $"Report gender pay gap data - reporting year {Model.ReportingYear} - Gender pay gap service";
- var encryptedOrganisationId = Encryption.EncryptQuerystring(Model.Organisation.OrganisationId.ToString());
+ var encryptedOrganisationId = Encryption.EncryptId(Model.Organisation.OrganisationId);
string formattedReportingYears = ReportingYearsHelper.FormatYearAsReportingPeriod(Model.ReportingYear);
}
diff --git a/GenderPayGap.WebUI/Views/Scope/ConfirmScope.cshtml b/GenderPayGap.WebUI/Views/Scope/ConfirmScope.cshtml
index 29252c604..cdbf75a01 100644
--- a/GenderPayGap.WebUI/Views/Scope/ConfirmScope.cshtml
+++ b/GenderPayGap.WebUI/Views/Scope/ConfirmScope.cshtml
@@ -11,7 +11,7 @@
}
@{
- string encryptedOrganisationId = Encryption.EncryptQuerystring(Model.Organisation.OrganisationId.ToString());
+ string encryptedOrganisationId = Encryption.EncryptId(Model.Organisation.OrganisationId);
string reportingYearsString = ReportingYearsHelper.FormatYearAsReportingPeriod(Model.ReportingYear.Year, "/");
string whyOutOfScopeFormatted = Model.WhyOutOfScope == WhyOutOfScope.Under250 ? "My employer had a headcount less than 250 employees on our snapshot date of " + Model.ReportingYear.ToString("d MMMM yyyy")
: "Other: " + Model.WhyOutOfScopeDetails;
diff --git a/GenderPayGap.WebUI/Views/Scope/DeclareScope.cshtml b/GenderPayGap.WebUI/Views/Scope/DeclareScope.cshtml
index 02488b893..5f8211a99 100644
--- a/GenderPayGap.WebUI/Views/Scope/DeclareScope.cshtml
+++ b/GenderPayGap.WebUI/Views/Scope/DeclareScope.cshtml
@@ -8,7 +8,7 @@
@{
ViewBag.Title = "Declare scope - Gender pay gap service";
- string encryptedOrganisationId = Encryption.EncryptQuerystring(Model.Organisation.OrganisationId.ToString());
+ string encryptedOrganisationId = Encryption.EncryptId(Model.Organisation.OrganisationId);
string formattedReportingYears = ReportingYearsHelper.FormatYearAsReportingPeriod(Model.PreviousReportingYear);
DateTime snapshotDate = Model.Organisation.SectorType.GetAccountingStartDate(Model.PreviousReportingYear);
}
diff --git a/GenderPayGap.WebUI/Views/Scope/FinishOutOfScopeJourney.cshtml b/GenderPayGap.WebUI/Views/Scope/FinishOutOfScopeJourney.cshtml
index 159752a59..55afc8645 100644
--- a/GenderPayGap.WebUI/Views/Scope/FinishOutOfScopeJourney.cshtml
+++ b/GenderPayGap.WebUI/Views/Scope/FinishOutOfScopeJourney.cshtml
@@ -8,7 +8,7 @@
}
@{
- string encryptedOrganisationId = Encryption.EncryptQuerystring(Model.Organisation.OrganisationId.ToString());
+ string encryptedOrganisationId = Encryption.EncryptId(Model.Organisation.OrganisationId);
string reportingYearsString = ReportingYearsHelper.FormatYearAsReportingPeriod(Model.ReportingYear.Year);
string reason = Model.WhyOutOfScope == WhyOutOfScope.Under250
? "My organisation had fewer than 250 employees on " + Model.ReportingYear.ToString("d MMMM yyyy")
diff --git a/GenderPayGap.WebUI/Views/Scope/OutOfScopeQuestions.cshtml b/GenderPayGap.WebUI/Views/Scope/OutOfScopeQuestions.cshtml
index d943b2f8e..63b6f658c 100644
--- a/GenderPayGap.WebUI/Views/Scope/OutOfScopeQuestions.cshtml
+++ b/GenderPayGap.WebUI/Views/Scope/OutOfScopeQuestions.cshtml
@@ -11,7 +11,7 @@
}
@{
- string encryptedOrganisationId = Encryption.EncryptQuerystring(Model.Organisation.OrganisationId.ToString());
+ string encryptedOrganisationId = Encryption.EncryptId(Model.Organisation.OrganisationId);
string reportingYearsString = ReportingYearsHelper.FormatYearAsReportingPeriod(Model.ReportingYear.Year, "/");
var breadcrumbModel = new ManageOrganisationBreadcrumbs
{
diff --git a/GenderPayGap.WebUI/Views/Scope/ScopeDeclared.cshtml b/GenderPayGap.WebUI/Views/Scope/ScopeDeclared.cshtml
index fba6f4ca0..9574883da 100644
--- a/GenderPayGap.WebUI/Views/Scope/ScopeDeclared.cshtml
+++ b/GenderPayGap.WebUI/Views/Scope/ScopeDeclared.cshtml
@@ -6,7 +6,7 @@
@{
ViewBag.Title = "Scope declared - Gender pay gap reporting service";
- string encryptedOrganisationId = Encryption.EncryptQuerystring(Model.Organisation.OrganisationId.ToString());
+ string encryptedOrganisationId = Encryption.EncryptId(Model.Organisation.OrganisationId);
string formattedReportingYears = ReportingYearsHelper.FormatYearAsReportingPeriod(Model.ReportingYear);
}
diff --git a/GenderPayGap.WebUI/Views/Search/SearchPage.cshtml b/GenderPayGap.WebUI/Views/Search/SearchPage.cshtml
index 429e9ee65..0a8eb5b5e 100644
--- a/GenderPayGap.WebUI/Views/Search/SearchPage.cshtml
+++ b/GenderPayGap.WebUI/Views/Search/SearchPage.cshtml
@@ -2,7 +2,6 @@
@using GovUkDesignSystem.GovUkDesignSystemComponents
@using Microsoft.AspNetCore.Mvc.TagHelpers
@using GenderPayGap.Core
-@using System.ComponentModel.DataAnnotations
@using GenderPayGap.Core.Helpers
@model GenderPayGap.WebUI.Models.Search.SearchPageViewModel
@@ -109,7 +108,7 @@
orgSize => orgSize,
orgSize => new LabelViewModel
{
- Text = orgSize.GetAttribute().Name
+ Text = orgSize.GetDisplayName()
}
),
classOptions: new Dictionary {{OrganisationSizes.NotProvided, "gpg-search-page--filter-employerSize--not-provided"}},
diff --git a/GenderPayGap.WebUI/Views/ViewReports/ComparisonBasketNew.cshtml b/GenderPayGap.WebUI/Views/ViewReports/ComparisonBasketNew.cshtml
index 5d8d1c454..d90ee414d 100644
--- a/GenderPayGap.WebUI/Views/ViewReports/ComparisonBasketNew.cshtml
+++ b/GenderPayGap.WebUI/Views/ViewReports/ComparisonBasketNew.cshtml
@@ -30,7 +30,7 @@
-
Clear list
diff --git a/GenderPayGap.WebUI/Views/ViewReports/ReportForYear.cshtml b/GenderPayGap.WebUI/Views/ViewReports/ReportForYear.cshtml
index 074e9152f..f277cc45e 100644
--- a/GenderPayGap.WebUI/Views/ViewReports/ReportForYear.cshtml
+++ b/GenderPayGap.WebUI/Views/ViewReports/ReportForYear.cshtml
@@ -4,7 +4,6 @@
@using GenderPayGap.WebUI.Helpers
@using GenderPayGap.Core
@using Microsoft.AspNetCore.Mvc.TagHelpers
-@using System.ComponentModel.DataAnnotations
@model GenderPayGap.Database.Return
@{
@@ -494,7 +493,7 @@
Employee headcount
- @(Model.OrganisationSize.GetAttribute().Name) employees
+ @(Model.OrganisationSize.GetDisplayName()) employees
@if (Model.Organisation.SectorType == SectorTypes.Private)
diff --git a/terraform/elasticbeanstalk.tf b/terraform/elasticbeanstalk.tf
index 64251655d..2fc326577 100644
--- a/terraform/elasticbeanstalk.tf
+++ b/terraform/elasticbeanstalk.tf
@@ -426,6 +426,12 @@ resource "aws_elastic_beanstalk_environment" "gpg_elastic_beanstalk_environment"
value = var.ELB_DEFAULT_ENCRYPTION_KEY
}
+ setting {
+ namespace = "aws:elasticbeanstalk:application:environment"
+ name = "DefaultEncryptionIv"
+ value = var.ELB_DEFAULT_ENCRYPTION_IV
+ }
+
setting {
namespace = "aws:elasticbeanstalk:application:environment"
name = "DisableSearchCache"
diff --git a/terraform/variables.tf b/terraform/variables.tf
index a2f406a95..1fa5be0f4 100644
--- a/terraform/variables.tf
+++ b/terraform/variables.tf
@@ -118,6 +118,10 @@ variable "ELB_DEFAULT_ENCRYPTION_KEY" {
type = string
}
+variable "ELB_DEFAULT_ENCRYPTION_IV" {
+ type = string
+}
+
variable "ELB_DISABLE_SEARCH_CACHE" {
type = string
}