From 610e7b4c87a7acdb7571e5357779c64a4a4256ae Mon Sep 17 00:00:00 2001 From: aurelio-aot Date: Tue, 31 Mar 2026 13:16:26 -0700 Subject: [PATCH] AB#32524: Allow non-numeric inputs for Year --- .../ApplicantHistory/CreateFundingHistoryModal.cshtml | 7 +------ .../ApplicantHistory/CreateIssueTrackingModal.cshtml | 11 +---------- .../ApplicantHistory/EditFundingHistoryModal.cshtml | 7 +------ .../ApplicantHistory/EditIssueTrackingModal.cshtml | 11 +---------- .../ApplicantHistory/FundingHistoryModalViewModel.cs | 1 - .../ApplicantHistory/IssueTrackingModalViewModel.cs | 2 -- 6 files changed, 4 insertions(+), 35 deletions(-) diff --git a/applications/Unity.GrantManager/src/Unity.GrantManager.Web/Pages/ApplicantHistory/CreateFundingHistoryModal.cshtml b/applications/Unity.GrantManager/src/Unity.GrantManager.Web/Pages/ApplicantHistory/CreateFundingHistoryModal.cshtml index bcfb1c8477..7ee772909b 100644 --- a/applications/Unity.GrantManager/src/Unity.GrantManager.Web/Pages/ApplicantHistory/CreateFundingHistoryModal.cshtml +++ b/applications/Unity.GrantManager/src/Unity.GrantManager.Web/Pages/ApplicantHistory/CreateFundingHistoryModal.cshtml @@ -20,7 +20,7 @@
@@ -93,11 +93,6 @@ } }); - var $fundingYear = $('#FundingHistoryForm_FundingYear'); - - $fundingYear.on('input', function () { - $(this).val($(this).val().replace(/\D/g, '').slice(0, 4)); - }); } })(); diff --git a/applications/Unity.GrantManager/src/Unity.GrantManager.Web/Pages/ApplicantHistory/CreateIssueTrackingModal.cshtml b/applications/Unity.GrantManager/src/Unity.GrantManager.Web/Pages/ApplicantHistory/CreateIssueTrackingModal.cshtml index db341e2b97..bc06d92312 100644 --- a/applications/Unity.GrantManager/src/Unity.GrantManager.Web/Pages/ApplicantHistory/CreateIssueTrackingModal.cshtml +++ b/applications/Unity.GrantManager/src/Unity.GrantManager.Web/Pages/ApplicantHistory/CreateIssueTrackingModal.cshtml @@ -14,7 +14,7 @@
@@ -55,12 +55,3 @@ - diff --git a/applications/Unity.GrantManager/src/Unity.GrantManager.Web/Pages/ApplicantHistory/EditFundingHistoryModal.cshtml b/applications/Unity.GrantManager/src/Unity.GrantManager.Web/Pages/ApplicantHistory/EditFundingHistoryModal.cshtml index b0e9ee813b..6ff9300a42 100644 --- a/applications/Unity.GrantManager/src/Unity.GrantManager.Web/Pages/ApplicantHistory/EditFundingHistoryModal.cshtml +++ b/applications/Unity.GrantManager/src/Unity.GrantManager.Web/Pages/ApplicantHistory/EditFundingHistoryModal.cshtml @@ -21,7 +21,7 @@
@@ -94,11 +94,6 @@ } }); - var $fundingYear = $('#FundingHistoryForm_FundingYear'); - - $fundingYear.on('input', function () { - $(this).val($(this).val().replace(/\D/g, '').slice(0, 4)); - }); } })(); diff --git a/applications/Unity.GrantManager/src/Unity.GrantManager.Web/Pages/ApplicantHistory/EditIssueTrackingModal.cshtml b/applications/Unity.GrantManager/src/Unity.GrantManager.Web/Pages/ApplicantHistory/EditIssueTrackingModal.cshtml index e2026fd636..90772ca98a 100644 --- a/applications/Unity.GrantManager/src/Unity.GrantManager.Web/Pages/ApplicantHistory/EditIssueTrackingModal.cshtml +++ b/applications/Unity.GrantManager/src/Unity.GrantManager.Web/Pages/ApplicantHistory/EditIssueTrackingModal.cshtml @@ -15,7 +15,7 @@
@@ -56,12 +56,3 @@ - diff --git a/applications/Unity.GrantManager/src/Unity.GrantManager.Web/Pages/ApplicantHistory/FundingHistoryModalViewModel.cs b/applications/Unity.GrantManager/src/Unity.GrantManager.Web/Pages/ApplicantHistory/FundingHistoryModalViewModel.cs index 33d5f23c66..7a7eea42f7 100644 --- a/applications/Unity.GrantManager/src/Unity.GrantManager.Web/Pages/ApplicantHistory/FundingHistoryModalViewModel.cs +++ b/applications/Unity.GrantManager/src/Unity.GrantManager.Web/Pages/ApplicantHistory/FundingHistoryModalViewModel.cs @@ -14,7 +14,6 @@ public class FundingHistoryModalViewModel public string? GrantCategory { get; set; } [DisplayName("Funding Year")] - [RegularExpression(@"^\d{4}$", ErrorMessage = "Funding Year must be a 4-digit number.")] public string? FundingYear { get; set; } [DisplayName("Renewed Funding")] diff --git a/applications/Unity.GrantManager/src/Unity.GrantManager.Web/Pages/ApplicantHistory/IssueTrackingModalViewModel.cs b/applications/Unity.GrantManager/src/Unity.GrantManager.Web/Pages/ApplicantHistory/IssueTrackingModalViewModel.cs index 2a50eaef24..50115cc716 100644 --- a/applications/Unity.GrantManager/src/Unity.GrantManager.Web/Pages/ApplicantHistory/IssueTrackingModalViewModel.cs +++ b/applications/Unity.GrantManager/src/Unity.GrantManager.Web/Pages/ApplicantHistory/IssueTrackingModalViewModel.cs @@ -1,6 +1,5 @@ using System; using System.ComponentModel; -using System.ComponentModel.DataAnnotations; using Microsoft.AspNetCore.Mvc; namespace Unity.GrantManager.Web.Pages.ApplicantHistory; @@ -11,7 +10,6 @@ public class IssueTrackingModalViewModel public Guid ApplicantId { get; set; } [DisplayName("Year")] - [RegularExpression(@"^\d{4}$", ErrorMessage = "Year must be a 4-digit number.")] public string? Year { get; set; } [DisplayName("Issue Heading")]