Add in subject, text, and implementation of an email for withdrawl

This commit is contained in:
Rebecca Hsieh 2023-08-20 14:52:23 -07:00
parent 87bb71a214
commit c2abdc3710
No known key found for this signature in database
GPG key ID: 644527A2F375A379
4 changed files with 76 additions and 1 deletions

View file

@ -590,6 +590,11 @@ class DomainApplication(TimeStampedModel):
@transition(field="status", source=[SUBMITTED, IN_REVIEW], target=WITHDRAWN)
def withdraw(self):
"""Withdraw an application that has been submitted."""
self._send_status_update_email(
"action needed",
"emails/domain_request_withdrawn.txt",
"emails/domain_request_withdrawn_subject.txt",
)
@transition(field="status", source=[IN_REVIEW, APPROVED], target=REJECTED)
def reject(self):

View file

@ -0,0 +1,69 @@
{% autoescape off %}{# In a text file, we don't want to have HTML entities escaped #}
Hi {{ application.submitter.first_name }}.
Your .gov domain request has been withdrawn.
DOMAIN REQUESTED: {{ application.requested_domain.name }}
REQUEST #: {{ application.id }}
STATUS: Withdrawn
YOU CAN EDIT YOUR WITHDRAWN REQUEST
The details of your withdrawn request are included below. You can edit and resubmit this application by logging into the registrar. <https://manage.get.gov/>.
THANK YOU
.Gov helps the public identify official, trusted information. Thank you for requesting a .gov domain.
----------------------------------------------------------------
SUMMARY OF YOUR DOMAIN REQUEST
Type of organization:
Organization name and mailing address:
{{ application.organization_name }}
{{ application.address_line1 }}
{{ application.address_line2 }}
{{ application.city }}
{{ application.state_territory }}
{{ application.zipcode }}
Type of work:
{{ application.type_of_work }}
Authorizing official:
{{ application.authorizing_official }}
Current website for your organization:
just current_websites
{{ application.current_websites }}
all
{{ application.current_websites.all }}
.gov domain:
{{ application.requested_domain.name }}
Purpose of your domain:
{{ application.purpose }}
Your contact information:
{{ application.submitter.title }}
{{ application.submitter }}
{{ application.submitter.email }}
{{ application.submitter.phone }}
Other employees from your organization:
all
{{ application.other_contacts.all }}
name
{{ application.other_contacts.name }}
Anything else we should know?:
{{ application.anything_else }}
Requirements for operating .gov domains:
{{ application.more_organization_information }}
----------------------------------------------------------------
The .gov team
Contact us: <https://get.gov/contact/>
Visit <https://get.gov>
{% endautoescape %}

View file

@ -0,0 +1 @@
Your .gov domain request has been withdrawn

View file

@ -31,7 +31,7 @@
10027 OUTOFSCOPE http://app:8080/public/js/uswds-init.min.js
# get-gov.js contains suspicious word "from" as in `Array.from()`
10027 OUTOFSCOPE http://app:8080/public/js/get-gov.js
# Ignore wording of "TODO"
# Ignores suspicious word "TODO"
10027 OUTOFSCOPE http://app:8080.*$
10028 FAIL (Open Redirect - Passive/beta)
10029 FAIL (Cookie Poisoning - Passive/beta)