From d7186eac865893d74a84fc3b145b9879278e2962 Mon Sep 17 00:00:00 2001 From: Kegan Maher Date: Tue, 9 Jul 2024 17:35:47 +0000 Subject: [PATCH] feat(cst): agency card form class --- benefits/eligibility/forms.py | 29 ++++++++++++++++++++++++ benefits/locale/en/LC_MESSAGES/django.po | 14 +++++++++--- benefits/locale/es/LC_MESSAGES/django.po | 22 +++++++++++++----- 3 files changed, 56 insertions(+), 9 deletions(-) diff --git a/benefits/eligibility/forms.py b/benefits/eligibility/forms.py index d66ee506b..d239f213b 100644 --- a/benefits/eligibility/forms.py +++ b/benefits/eligibility/forms.py @@ -141,6 +141,35 @@ def clean(self): raise forms.ValidationError("reCAPTCHA failed") +class CSTAgencyCard(EligibilityVerificationForm): + """EligibilityVerification form for the CST Agency Card.""" + + def __init__(self, *args, **kwargs): + super().__init__( + title=_("Agency card information"), + headline=_("Let’s find the record of your transit benefit."), + blurb=_( + "We use the information on your CST Agency Card to find the record of your transit benefit in our system." + ), + name_label=_("Last Name"), + name_placeholder="Hernandez-Demarcos", + name_help_text=_( + "Please enter your last name the same way it is printed on your card, including capital letters and hyphens." + ), + sub_label=_("Agency Card number"), + sub_help_text=_("This is a 5-digit number on the front and back of your card."), + sub_placeholder="12345", + name_max_length=255, + sub_input_mode="numeric", + sub_max_length=5, + sub_pattern=r"\d{5}", + sub_custom_validity=_("Please enter a 5-digit number."), + name_custom_validity=_("Please enter your last name."), + *args, + **kwargs, + ) + + class MSTCourtesyCard(EligibilityVerificationForm): """EligibilityVerification form for the MST Courtesy Card.""" diff --git a/benefits/locale/en/LC_MESSAGES/django.po b/benefits/locale/en/LC_MESSAGES/django.po index 9a6d7d1cf..81eeeee2d 100644 --- a/benefits/locale/en/LC_MESSAGES/django.po +++ b/benefits/locale/en/LC_MESSAGES/django.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Report-Msgid-Bugs-To: https://github.com/cal-itp/benefits/issues \n" -"POT-Creation-Date: 2024-07-03 13:26-0700\n" +"POT-Creation-Date: 2024-07-09 10:43-0700\n" "Language: English\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -333,7 +333,7 @@ msgid "Let’s find the record of your transit benefit." msgstr "" msgid "" -"We use the information on your MST Courtesy Card to find the record of your " +"We use the information on your CST Agency Card to find the record of your " "transit benefit in our system." msgstr "" @@ -345,7 +345,7 @@ msgid "" "including capital letters and hyphens." msgstr "" -msgid "Courtesy Card number" +msgid "Agency Card number" msgstr "" msgid "This is a 5-digit number on the front and back of your card." @@ -357,6 +357,14 @@ msgstr "" msgid "Please enter your last name." msgstr "" +msgid "" +"We use the information on your MST Courtesy Card to find the record of your " +"transit benefit in our system." +msgstr "" + +msgid "Courtesy Card number" +msgstr "" + msgid "" "We use the information on your SBMTD Reduced Fare Mobility ID card to find " "the record of your transit benefit in our system." diff --git a/benefits/locale/es/LC_MESSAGES/django.po b/benefits/locale/es/LC_MESSAGES/django.po index 683f20c62..a19111839 100644 --- a/benefits/locale/es/LC_MESSAGES/django.po +++ b/benefits/locale/es/LC_MESSAGES/django.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Report-Msgid-Bugs-To: https://github.com/cal-itp/benefits/issues \n" -"POT-Creation-Date: 2024-07-03 13:26-0700\n" +"POT-Creation-Date: 2024-07-09 10:43-0700\n" "Language: Español\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -444,11 +444,11 @@ msgid "Let’s find the record of your transit benefit." msgstr "Veamos si podemos confirmar su elegibilidad." msgid "" -"We use the information on your MST Courtesy Card to find the record of your " +"We use the information on your CST Agency Card to find the record of your " "transit benefit in our system." msgstr "" -"Usamos la información de su tarjeta de cortesía de MST para confirmar su " -"elegibilidad en nuestro sistema." +"Utilizamos la información de su Tarjeta de agencia CST para encontrar el " +"registro de su beneficio de tránsito en nuestro sistema." msgid "Last Name" msgstr "Apellido" @@ -460,8 +460,8 @@ msgstr "" "Ingrese su apellido de la misma manera que está impreso en su tarjeta, " "incluyendo mayúsculas y guiones." -msgid "Courtesy Card number" -msgstr "Número de tarjeta de cortesía de MST" +msgid "Agency Card number" +msgstr "Número de tarjeta de agencia de CST" msgid "This is a 5-digit number on the front and back of your card." msgstr "Este es un número de 5 dígitos en el anverso y reverso de su tarjeta." @@ -472,6 +472,16 @@ msgstr "Ingrese un número de 5 dígitos." msgid "Please enter your last name." msgstr "Ingrese su apellido." +msgid "" +"We use the information on your MST Courtesy Card to find the record of your " +"transit benefit in our system." +msgstr "" +"Usamos la información de su tarjeta de cortesía de MST para confirmar su " +"elegibilidad en nuestro sistema." + +msgid "Courtesy Card number" +msgstr "Número de tarjeta de cortesía de MST" + msgid "" "We use the information on your SBMTD Reduced Fare Mobility ID card to find " "the record of your transit benefit in our system."