From 7e4192178c0df93ec3786fa30f5e7320f4c2525b Mon Sep 17 00:00:00 2001 From: zandercymatics <141044360+zandercymatics@users.noreply.github.com> Date: Mon, 11 Dec 2023 14:25:53 -0700 Subject: [PATCH 1/4] Fix zip code message --- src/registrar/forms/application_wizard.py | 2 +- src/registrar/forms/domain.py | 2 +- src/registrar/tests/test_forms.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/registrar/forms/application_wizard.py b/src/registrar/forms/application_wizard.py index 9a8899e2b..5310c4610 100644 --- a/src/registrar/forms/application_wizard.py +++ b/src/registrar/forms/application_wizard.py @@ -262,7 +262,7 @@ class OrganizationContactForm(RegistrarForm): validators=[ RegexValidator( "^[0-9]{5}(?:-[0-9]{4})?$|^$", - message="Enter a zip code in the form of 12345 or 12345-6789.", + message="Enter a zip code in the required format, like 12345 or 12345-6789.", ) ], ) diff --git a/src/registrar/forms/domain.py b/src/registrar/forms/domain.py index ff41b9268..fd2fb018e 100644 --- a/src/registrar/forms/domain.py +++ b/src/registrar/forms/domain.py @@ -239,7 +239,7 @@ class DomainOrgNameAddressForm(forms.ModelForm): validators=[ RegexValidator( "^[0-9]{5}(?:-[0-9]{4})?$|^$", - message="Enter a zip code in the form of 12345 or 12345-6789.", + message="Enter a zip code in the required format, like 12345 or 12345-6789.", ) ], ) diff --git a/src/registrar/tests/test_forms.py b/src/registrar/tests/test_forms.py index 035e1c8c5..00bb7ce61 100644 --- a/src/registrar/tests/test_forms.py +++ b/src/registrar/tests/test_forms.py @@ -30,7 +30,7 @@ class TestFormValidation(MockEppLib): form = OrganizationContactForm(data={"zipcode": "nah"}) self.assertEqual( form.errors["zipcode"], - ["Enter a zip code in the form of 12345 or 12345-6789."], + ["Enter a zip code in the required format, like 12345 or 12345-6789."], ) def test_org_contact_zip_valid(self): From 325956b392d026e4b1069ac3c9b404ae978ffb25 Mon Sep 17 00:00:00 2001 From: zandercymatics <141044360+zandercymatics@users.noreply.github.com> Date: Tue, 12 Dec 2023 11:09:30 -0700 Subject: [PATCH 2/4] Fix filter --- src/registrar/models/user.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/registrar/models/user.py b/src/registrar/models/user.py index 0a153b5c8..0edce6a0b 100644 --- a/src/registrar/models/user.py +++ b/src/registrar/models/user.py @@ -91,7 +91,7 @@ class User(AbstractUser): # A new incoming user who is being invited to be a domain manager (that is, # their email address is in DomainInvitation for an invitation that is not yet "retrieved"). - if DomainInvitation.objects.filter(email=email, status=DomainInvitation.INVITED).exists(): + if DomainInvitation.objects.filter(email=email, status=DomainInvitation.DomainInvitationStatus.INVITED).exists(): return False return True From 60344c3365f9476fe37662ed779744fbd1052c27 Mon Sep 17 00:00:00 2001 From: Neil Martinsen-Burrell Date: Tue, 12 Dec 2023 12:13:04 -0600 Subject: [PATCH 3/4] Change email links to point to manage.get.gov and the correct object ID --- src/registrar/templates/emails/status_change_approved.txt | 4 ++-- src/registrar/templates/emails/status_change_in_review.txt | 2 +- src/registrar/templates/emails/submission_confirmation.txt | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/registrar/templates/emails/status_change_approved.txt b/src/registrar/templates/emails/status_change_approved.txt index 80bf78842..25abe6e69 100644 --- a/src/registrar/templates/emails/status_change_approved.txt +++ b/src/registrar/templates/emails/status_change_approved.txt @@ -14,7 +14,7 @@ Now that your .gov domain has been approved, there are a few more things to do b YOU MUST ADD DOMAIN NAME SERVER INFORMATION Before your .gov domain can be used, you have to connect it to your Domain Name System (DNS) hosting service. At this time, we don’t provide DNS hosting services. -Go to the domain management page to add your domain name server information . +Go to the domain management page to add your domain name server information . Get help with adding your domain name server information . @@ -23,7 +23,7 @@ ADD DOMAIN MANAGERS, SECURITY EMAIL We strongly recommend that you add other points of contact who will help manage your domain. We also recommend that you provide a security email. This email will allow the public to report security issues on your domain. Security emails are made public. -Go to the domain management page to add domain contacts and a security email . +Go to the domain management page to add domain contacts and a security email . Get help with managing your .gov domain . diff --git a/src/registrar/templates/emails/status_change_in_review.txt b/src/registrar/templates/emails/status_change_in_review.txt index 63df669eb..b45b0d244 100644 --- a/src/registrar/templates/emails/status_change_in_review.txt +++ b/src/registrar/templates/emails/status_change_in_review.txt @@ -22,7 +22,7 @@ NEXT STEPS - We’re reviewing your request. This usually takes 20 business days. - You can check the status of your request at any time. - + - We’ll email you with questions or when we complete our review. diff --git a/src/registrar/templates/emails/submission_confirmation.txt b/src/registrar/templates/emails/submission_confirmation.txt index 41fab8005..2b0c0e86e 100644 --- a/src/registrar/templates/emails/submission_confirmation.txt +++ b/src/registrar/templates/emails/submission_confirmation.txt @@ -21,7 +21,7 @@ NEXT STEPS - We’ll review your request. This usually takes 20 business days. - You can check the status of your request at any time. - + - We’ll email you with questions or when we complete our review. From 8b0e5f04930779692a562a6973cd13a9f761ee6b Mon Sep 17 00:00:00 2001 From: zandercymatics <141044360+zandercymatics@users.noreply.github.com> Date: Tue, 12 Dec 2023 12:09:33 -0700 Subject: [PATCH 4/4] Fix linter --- src/registrar/models/user.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/registrar/models/user.py b/src/registrar/models/user.py index 0edce6a0b..ec2d06c70 100644 --- a/src/registrar/models/user.py +++ b/src/registrar/models/user.py @@ -91,7 +91,8 @@ class User(AbstractUser): # A new incoming user who is being invited to be a domain manager (that is, # their email address is in DomainInvitation for an invitation that is not yet "retrieved"). - if DomainInvitation.objects.filter(email=email, status=DomainInvitation.DomainInvitationStatus.INVITED).exists(): + invited = DomainInvitation.DomainInvitationStatus.INVITED + if DomainInvitation.objects.filter(email=email, status=invited).exists(): return False return True