mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-06-09 22:14:43 +02:00
Process of removal security email from the codes
This commit is contained in:
parent
e29482f0c4
commit
1441044415
4 changed files with 2 additions and 33 deletions
|
@ -35,7 +35,6 @@ for step, view in [
|
||||||
(Step.PURPOSE, views.Purpose),
|
(Step.PURPOSE, views.Purpose),
|
||||||
(Step.YOUR_CONTACT, views.YourContact),
|
(Step.YOUR_CONTACT, views.YourContact),
|
||||||
(Step.OTHER_CONTACTS, views.OtherContacts),
|
(Step.OTHER_CONTACTS, views.OtherContacts),
|
||||||
(Step.SECURITY_EMAIL, views.SecurityEmail),
|
|
||||||
(Step.ANYTHING_ELSE, views.AnythingElse),
|
(Step.ANYTHING_ELSE, views.AnythingElse),
|
||||||
(Step.REQUIREMENTS, views.Requirements),
|
(Step.REQUIREMENTS, views.Requirements),
|
||||||
(Step.REVIEW, views.Review),
|
(Step.REVIEW, views.Review),
|
||||||
|
|
|
@ -28,8 +28,10 @@ class RegistrarForm(forms.Form):
|
||||||
def __init__(self, *args, **kwargs):
|
def __init__(self, *args, **kwargs):
|
||||||
kwargs.setdefault("label_suffix", "")
|
kwargs.setdefault("label_suffix", "")
|
||||||
# save a reference to an application object
|
# save a reference to an application object
|
||||||
|
archived = kwargs.pop('archived', None)
|
||||||
self.application = kwargs.pop("application", None)
|
self.application = kwargs.pop("application", None)
|
||||||
super(RegistrarForm, self).__init__(*args, **kwargs)
|
super(RegistrarForm, self).__init__(*args, **kwargs)
|
||||||
|
self.fields['archived'] = forms.BooleanField(initial=archived, required=False)
|
||||||
|
|
||||||
def to_database(self, obj: DomainApplication | Contact):
|
def to_database(self, obj: DomainApplication | Contact):
|
||||||
"""
|
"""
|
||||||
|
@ -672,18 +674,6 @@ class NoOtherContactsForm(RegistrarForm):
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
class SecurityEmailForm(RegistrarForm):
|
|
||||||
security_email = forms.EmailField(
|
|
||||||
required=False,
|
|
||||||
label="Security email for public use",
|
|
||||||
error_messages={
|
|
||||||
"invalid": (
|
|
||||||
"Enter an email address in the required format, like name@example.com."
|
|
||||||
)
|
|
||||||
},
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
class AnythingElseForm(RegistrarForm):
|
class AnythingElseForm(RegistrarForm):
|
||||||
anything_else = forms.CharField(
|
anything_else = forms.CharField(
|
||||||
required=False,
|
required=False,
|
||||||
|
|
|
@ -9,7 +9,6 @@ from registrar.forms.application_wizard import (
|
||||||
OrganizationContactForm,
|
OrganizationContactForm,
|
||||||
YourContactForm,
|
YourContactForm,
|
||||||
OtherContactsForm,
|
OtherContactsForm,
|
||||||
SecurityEmailForm,
|
|
||||||
RequirementsForm,
|
RequirementsForm,
|
||||||
TribalGovernmentForm,
|
TribalGovernmentForm,
|
||||||
)
|
)
|
||||||
|
@ -117,19 +116,6 @@ class TestFormValidation(TestCase):
|
||||||
form.errors["phone"][0].startswith("Enter a valid phone number")
|
form.errors["phone"][0].startswith("Enter a valid phone number")
|
||||||
)
|
)
|
||||||
|
|
||||||
def test_security_email_form_blank(self):
|
|
||||||
"""Can leave the security_email field blank."""
|
|
||||||
form = SecurityEmailForm(data={})
|
|
||||||
self.assertEqual(len(form.errors), 0)
|
|
||||||
|
|
||||||
def test_security_email_form_invalid(self):
|
|
||||||
"""Can leave the security_email field blank."""
|
|
||||||
form = SecurityEmailForm(data={"security_email": "boss@boss"})
|
|
||||||
self.assertEqual(
|
|
||||||
form.errors["security_email"],
|
|
||||||
["Enter an email address in the required format, like name@example.com."],
|
|
||||||
)
|
|
||||||
|
|
||||||
def test_requirements_form_blank(self):
|
def test_requirements_form_blank(self):
|
||||||
"""Requirements box unchecked is an error."""
|
"""Requirements box unchecked is an error."""
|
||||||
form = RequirementsForm(data={})
|
form = RequirementsForm(data={})
|
||||||
|
|
|
@ -37,7 +37,6 @@ class Step(StrEnum):
|
||||||
PURPOSE = "purpose"
|
PURPOSE = "purpose"
|
||||||
YOUR_CONTACT = "your_contact"
|
YOUR_CONTACT = "your_contact"
|
||||||
OTHER_CONTACTS = "other_contacts"
|
OTHER_CONTACTS = "other_contacts"
|
||||||
SECURITY_EMAIL = "security_email"
|
|
||||||
ANYTHING_ELSE = "anything_else"
|
ANYTHING_ELSE = "anything_else"
|
||||||
REQUIREMENTS = "requirements"
|
REQUIREMENTS = "requirements"
|
||||||
REVIEW = "review"
|
REVIEW = "review"
|
||||||
|
@ -82,7 +81,6 @@ class ApplicationWizard(LoginRequiredMixin, TemplateView):
|
||||||
Step.PURPOSE: _("Purpose of your domain"),
|
Step.PURPOSE: _("Purpose of your domain"),
|
||||||
Step.YOUR_CONTACT: _("Your contact information"),
|
Step.YOUR_CONTACT: _("Your contact information"),
|
||||||
Step.OTHER_CONTACTS: _("Other contacts for your organization"),
|
Step.OTHER_CONTACTS: _("Other contacts for your organization"),
|
||||||
Step.SECURITY_EMAIL: _("Security email for public use"),
|
|
||||||
Step.ANYTHING_ELSE: _("Anything else we should know?"),
|
Step.ANYTHING_ELSE: _("Anything else we should know?"),
|
||||||
Step.REQUIREMENTS: _(
|
Step.REQUIREMENTS: _(
|
||||||
"Requirements for registration and operation of .gov domains"
|
"Requirements for registration and operation of .gov domains"
|
||||||
|
@ -428,10 +426,6 @@ class OtherContacts(ApplicationWizard):
|
||||||
forms = [forms.OtherContactsFormSet, forms.NoOtherContactsForm]
|
forms = [forms.OtherContactsFormSet, forms.NoOtherContactsForm]
|
||||||
|
|
||||||
|
|
||||||
class SecurityEmail(ApplicationWizard):
|
|
||||||
template_name = "application_security_email.html"
|
|
||||||
forms = [forms.SecurityEmailForm]
|
|
||||||
|
|
||||||
|
|
||||||
class AnythingElse(ApplicationWizard):
|
class AnythingElse(ApplicationWizard):
|
||||||
template_name = "application_anything_else.html"
|
template_name = "application_anything_else.html"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue