diff --git a/src/registrar/admin.py b/src/registrar/admin.py index b3a603d84..c5dbb152b 100644 --- a/src/registrar/admin.py +++ b/src/registrar/admin.py @@ -1123,7 +1123,7 @@ class DomainRequestAdmin(ListHeaderAdmin): ] # Readonly fields for analysts and superusers - readonly_fields = ("other_contacts", "current_websites") + readonly_fields = ("other_contacts", "current_websites", "alternative_domains") # Read only that we'll leverage for CISA Analysts analyst_readonly_fields = [ diff --git a/src/registrar/assets/js/get-gov-admin.js b/src/registrar/assets/js/get-gov-admin.js index f7ea0fa1d..8c60c534f 100644 --- a/src/registrar/assets/js/get-gov-admin.js +++ b/src/registrar/assets/js/get-gov-admin.js @@ -170,35 +170,6 @@ function checkToListThenInitWidget(toListId, attempts) { } } -(function() { - function addUrlsToOtherContacts() { - document.addEventListener('DOMContentLoaded', function() { - // Select all table rows that have a data-contact-id attribute - let contactRows = document.querySelectorAll("tr[data-contact-url]"); - if (!contactRows || contactRows.length == 0) { - contactRows = document.querySelectorAll(".other-contact-id") - } - - if (contactRows){ - // Add a click event listener to each row - let index = 1; - contactRows.forEach(function(row) { - let otherContactUrl = row.getAttribute("data-contact-url"); - if (otherContactUrl){ - let otherContact = document.querySelector(`.other-contact__${index}`); - if (otherContact) { - otherContact.href = otherContactUrl; - } - } - index++; - }); - } - }); - } - - addUrlsToOtherContacts() -})(); - // Initialize the widget: // add related buttons to the widget for edit, delete and view // add event listeners on the from list, the to list, and selector buttons which either enable or disable the related buttons diff --git a/src/registrar/assets/sass/_theme/_admin.scss b/src/registrar/assets/sass/_theme/_admin.scss index 6310fa08e..4bddfd1df 100644 --- a/src/registrar/assets/sass/_theme/_admin.scss +++ b/src/registrar/assets/sass/_theme/_admin.scss @@ -351,6 +351,7 @@ details.dja-detail-table { display: inline-table; background-color: var(--body-bg); .dja-details-summary { + cursor: pointer; color: var(--body-quiet-color); } @@ -378,21 +379,15 @@ details.dja-detail-table { } -ul.padding-left-0__detail-list { - padding-left: 0 !important; -} -ul.margin-left-0__detail-list { - margin-left: 0 !important; -} - -ul.margin-top-neg-1__detail-list { +address.margin-top-neg-1__detail-list { margin-top: -8px !important; } .dja-detail-list { dl { padding-left: 0px !important; + margin-top: 5px !important; } // Mimic the normal label size dt { @@ -406,6 +401,11 @@ ul.margin-top-neg-1__detail-list { } } +address.dja-address-contact-list { + font-size: 0.8125rem; + color: var(--body-quiet-color); +} + // Mimic the normal label size @media (max-width: 1024px){ .dja-detail-list dt { diff --git a/src/registrar/templates/django/admin/includes/contact_detail_list.html b/src/registrar/templates/django/admin/includes/contact_detail_list.html index b0b21ea8e..6afe4c8d6 100644 --- a/src/registrar/templates/django/admin/includes/contact_detail_list.html +++ b/src/registrar/templates/django/admin/includes/contact_detail_list.html @@ -1,42 +1,51 @@ {% load i18n static %} +
+ + {% if show_formatted_name %} + {% if contact.get_formatted_name %} + {{ user.get_formatted_name }}Contact information | +Other contact information | ||||||
---|---|---|---|---|---|---|---|
{{contact.first_name}} {{contact.last_name}} | +|||||||
{{ contact.get_formatted_name }} | {{ contact.title }} | {{ contact.email }} | {{ contact.phone }} | diff --git a/src/registrar/tests/test_admin.py b/src/registrar/tests/test_admin.py index df3d760a8..3d88bd8bd 100644 --- a/src/registrar/tests/test_admin.py +++ b/src/registrar/tests/test_admin.py @@ -1303,13 +1303,11 @@ class TestDomainRequestAdmin(MockEppLib): # == Check for the creator == # # Check for the right title, email, and phone number in the response. - # We only need to check for the end tag - # (Otherwise this test will fail if we change classes, etc) expected_creator_fields = [ # Field, expected value - ("title", "Treat inspector"), - ("email", "meoward.jones@igorville.gov"), - ("phone", "(555) 123 12345"), + ("title", "Treat inspector"), + ("email", "meoward.jones@igorville.gov"), + ("phone", "(555) 123 12345"), ] self.test_helper.assert_response_contains_distinct_values(response, expected_creator_fields) @@ -1319,9 +1317,9 @@ class TestDomainRequestAdmin(MockEppLib): # == Check for the submitter == # expected_submitter_fields = [ # Field, expected value - ("title", "Admin Tester"), - ("email", "mayor@igorville.gov"), - ("phone", "(555) 555 5556"), + ("title", "Admin Tester"), + ("email", "mayor@igorville.gov"), + ("phone", "(555) 555 5556"), ] self.test_helper.assert_response_contains_distinct_values(response, expected_submitter_fields) self.assertContains(response, "Testy2 Tester2") @@ -1329,15 +1327,15 @@ class TestDomainRequestAdmin(MockEppLib): # == Check for the authorizing_official == # expected_ao_fields = [ # Field, expected value - ("title", "Chief Tester"), - ("email", "testy@town.com"), - ("phone", "(555) 555 5555"), + ("title", "Chief Tester"), + ("email", "testy@town.com"), + ("phone", "(555) 555 5555"), ] self.test_helper.assert_response_contains_distinct_values(response, expected_ao_fields) - # count=3 because the underlying domain has two users with this name. - # The dropdown has 2 of these. - self.assertContains(response, "Testy Tester", count=3) + # count=5 because the underlying domain has two users with this name. + # The dropdown has 3 of these. + self.assertContains(response, "Testy Tester", count=5) # == Test the other_employees field == # expected_other_employees_fields = [ @@ -2022,9 +2020,9 @@ class TestDomainInformationAdmin(TestCase): # (Otherwise this test will fail if we change classes, etc) expected_creator_fields = [ # Field, expected value - ("title", "Treat inspector"), - ("email", "meoward.jones@igorville.gov"), - ("phone", "(555) 123 12345"), + ("title", "Treat inspector"), + ("email", "meoward.jones@igorville.gov"), + ("phone", "(555) 123 12345"), ] self.test_helper.assert_response_contains_distinct_values(response, expected_creator_fields) @@ -2034,9 +2032,9 @@ class TestDomainInformationAdmin(TestCase): # == Check for the submitter == # expected_submitter_fields = [ # Field, expected value - ("title", "Admin Tester"), - ("email", "mayor@igorville.gov"), - ("phone", "(555) 555 5556"), + ("title", "Admin Tester"), + ("email", "mayor@igorville.gov"), + ("phone", "(555) 555 5556"), ] self.test_helper.assert_response_contains_distinct_values(response, expected_submitter_fields) self.assertContains(response, "Testy2 Tester2") @@ -2044,15 +2042,15 @@ class TestDomainInformationAdmin(TestCase): # == Check for the authorizing_official == # expected_ao_fields = [ # Field, expected value - ("title", "Chief Tester"), - ("email", "testy@town.com"), - ("phone", "(555) 555 5555"), + ("title", "Chief Tester"), + ("email", "testy@town.com"), + ("phone", "(555) 555 5555"), ] self.test_helper.assert_response_contains_distinct_values(response, expected_ao_fields) - # count=3 because the underlying domain has two users with this name. - # The dropdown has 2 of these. - self.assertContains(response, "Testy Tester", count=3) + # count=5 because the underlying domain has two users with this name. + # The dropdown has 3 of these. + self.assertContains(response, "Testy Tester", count=5) # == Test the other_employees field == # expected_other_employees_fields = [