Merge remote-tracking branch 'origin/main' into rjm/520-contact-information

This commit is contained in:
rachidatecs 2023-05-23 18:53:12 -04:00
commit 2403976c8a
No known key found for this signature in database
GPG key ID: 3CEBBFA7325E5525
4 changed files with 16 additions and 13 deletions

View file

@ -61,18 +61,15 @@
<a class="usa-skipnav" href="#main-content">Skip to main content</a>
{% if IS_DEMO_SITE %}
<section
class="usa-site-alert usa-site-alert--emergency usa-site-alert--no-icon"
aria-label="Site alert"
>
<div class="usa-alert">
<div class="usa-alert__body">
<p class="usa-alert__text">
<strong>TEST SITE</strong> - Do not use real personal information. Demo purposes only.
</p>
</div>
<section aria-label="Alert" >
<div class="usa-alert usa-alert--warning usa-alert--no-icon">
<div class="usa-alert__body">
<p class="usa-alert__text">
<strong>BETA SITE:</strong> Were building a new way to get a .gov. Take a look around, but dont rely on this site yet. This site is for testing purposes only. Dont enter real data into any form on this site. To learn about requesting a .gov domain, visit <a href="https://get.gov" class="usa-link">get.gov</a>
</p>
</div>
</section>
</div>
</section>
{% endif %}
<section class="usa-banner" aria-label="Official website of the United States government">

View file

@ -22,7 +22,7 @@
<h2>Registered domains</h2>
{% if domains %}
<table class="usa-table usa-table--borderless usa-table--stacked dotgov-table dotgov-table--stacked">
<caption class="sr-only">Your domain applications</caption>
<caption class="sr-only">Your registered domains</caption>
<thead>
<tr>
<th data-sortable scope="col" role="columnheader">Domain name</th>

View file

@ -1082,6 +1082,12 @@ class TestDomainPermissions(TestWithDomainPermissions):
)
self.assertEqual(response.status_code, 403)
with less_console_noise():
response = self.client.get(
reverse("domain-security-email", kwargs={"pk": self.domain.id})
)
self.assertEqual(response.status_code, 403)
class TestDomainDetail(TestWithDomainPermissions, WebTest):
def setUp(self):

View file

@ -184,7 +184,7 @@ class DomainSecurityEmailView(DomainPermission, FormMixin, DetailView):
"""The form is valid, call setter in model."""
# Set the security email from the form
new_email = form.cleaned_data["security_email"]
new_email = form.cleaned_data.get("security_email", "")
domain = self.get_object()
domain.set_security_email(new_email)